<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marcos Popa</title>
    <description>The latest articles on DEV Community by Marcos Popa (@marcospopa).</description>
    <link>https://dev.to/marcospopa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1023852%2Fa9d6246a-b2bf-473c-a7b8-8cdaf09afbf9.png</url>
      <title>DEV Community: Marcos Popa</title>
      <link>https://dev.to/marcospopa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marcospopa"/>
    <language>en</language>
    <item>
      <title>Deploy Nginx "Hello World" App using Docker</title>
      <dc:creator>Marcos Popa</dc:creator>
      <pubDate>Thu, 09 Feb 2023 18:03:22 +0000</pubDate>
      <link>https://dev.to/marcospopa/deploy-nginx-hello-world-app-using-docker-2i3p</link>
      <guid>https://dev.to/marcospopa/deploy-nginx-hello-world-app-using-docker-2i3p</guid>
      <description>&lt;p&gt;Here is a step-by-step guide to deploy a Docker Nginx "Hello World" app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Docker on your machine. You can find the installation instructions for your operating system at the official Docker website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new directory for your app and navigate to it in your terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new file named "Dockerfile" in this directory and paste the following content:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM nginx:alpine
COPY index.html /usr/share/nginx/html/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create an "index.html" file in the same directory with the following content:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Hello World&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Hello World&amp;lt;/h1&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run the following command in your terminal to build the Docker image:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;docker build -t hello-world-nginx .&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the following command to start a new container based on the image you just built:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;docker run -p 8080:80 hello-world-nginx&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visit &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt; in your browser to see the "Hello World" message displayed by Nginx.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it! You have successfully deployed a Docker Nginx "Hello World" app.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
