<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Build nodejs application with docker and ec2 - Medium]]></title>
        <description><![CDATA[how to build and deploy sample nodejs application using docker and ec2 instance - Medium]]></description>
        <link>https://medium.com/build-nodejs-application-with-docker-and-ec2?source=rss----58f287adc108---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Build nodejs application with docker and ec2 - Medium</title>
            <link>https://medium.com/build-nodejs-application-with-docker-and-ec2?source=rss----58f287adc108---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 17:35:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/build-nodejs-application-with-docker-and-ec2" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Docker is a containerization platform that allows you to build,test,run and deploy your…]]></title>
            <link>https://medium.com/build-nodejs-application-with-docker-and-ec2/docker-is-a-containerization-platform-that-allows-you-to-build-test-run-and-deploy-your-81604849aa85?source=rss----58f287adc108---4</link>
            <guid isPermaLink="false">https://medium.com/p/81604849aa85</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[sample-app]]></category>
            <dc:creator><![CDATA[Bhagyashri]]></dc:creator>
            <pubDate>Thu, 26 Dec 2019 18:39:38 GMT</pubDate>
            <atom:updated>2019-12-26T18:39:38.806Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker is a containerization platform that allows you to build,test,run and deploy your application into any environment.It packages application into unit called container. Docker container has everything which needs to run your application like code,libraries,docker image,system tools,runtime.</p><p>We are going to build sample nodejs application using docker. We need one AWS ec2 instance and docker installed on that instance to run our application. To install docker on ec2 instance use command:</p><p><em>sudo apt-get update</em></p><p><em>sudo apt-get install docker.io</em></p><p>Once docker is installed on ec2 instance clone the code from git repo:</p><p><a href="https://github.com/machaleb/SampleNodeAppWithDocker.git">github</a> repo</p><p><a href="https://github.com/machaleb/SampleNodeAppWithDocker.git">machaleb/SampleNodeAppWithDocker</a></p><p>Now understande Dockerfile which is already cloned with your Sample Node application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qk5OlLZ6ttd5b5T1b1sQFA.png" /><figcaption>Dockerfile</figcaption></figure><p>Now create image with this Dockerfile by running command</p><p><em>docker build -t samplenode/app .</em></p><p>where <em>samplenode/app</em> is image name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEdWKCRJMvF1i3ixV6JCKA.png" /></figure><p>Once image get build you can see the image by running command:</p><p><em>docker images</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BVwT0mpkAWDHZxPhYgN14Q.png" /><figcaption>docker images</figcaption></figure><p>Now you can run your container with this docker image using command:</p><p><em>docker run -itd -p 8080:8080 samplenode/app</em></p><p>see the output with: <em>docker ps</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yObfPayEXAkailZEM8VIuQ.png" /><figcaption>docker ps</figcaption></figure><p>Access the application with:</p><p><em>curl http://localhost:8080/</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TDOE-Oywwm0XM08oZeDEGQ.png" /><figcaption>access application with curl</figcaption></figure><p>To see docker logs use: <em>docker logs container_id</em></p><p>to go inside container use: <em>docker exec -it container_id bash</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81604849aa85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/build-nodejs-application-with-docker-and-ec2/docker-is-a-containerization-platform-that-allows-you-to-build-test-run-and-deploy-your-81604849aa85">Docker is a containerization platform that allows you to build,test,run and deploy your…</a> was originally published in <a href="https://medium.com/build-nodejs-application-with-docker-and-ec2">Build nodejs application with docker and ec2</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>