<?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"><channel><title><![CDATA[My DevOps Journey]]></title><description><![CDATA[My DevOps Journey]]></description><link>https://day-1-of-my-devops-journey-docker.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 23 Jun 2026 21:47:02 GMT</lastBuildDate><atom:link href="https://day-1-of-my-devops-journey-docker.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Day 2 of My DevOps Journey: Dockerizing Applications and Multi-Container Setup 🚀]]></title><description><![CDATA[After getting comfortable with basic Docker concepts yesterday, I dove deep into creating custom Docker images, deploying to AWS, and setting up multi-container applications. Here's my learning journey from Day 2!
1. Creating Custom Dockerfiles 📝
I ...]]></description><link>https://day-1-of-my-devops-journey-docker.hashnode.dev/day-2-of-my-devops-journey-dockerizing-applications-and-multi-container-setup</link><guid isPermaLink="true">https://day-1-of-my-devops-journey-docker.hashnode.dev/day-2-of-my-devops-journey-dockerizing-applications-and-multi-container-setup</guid><category><![CDATA[Docker]]></category><category><![CDATA[Docker compose]]></category><category><![CDATA[docker images]]></category><category><![CDATA[Dockerfile]]></category><category><![CDATA[docker-network]]></category><category><![CDATA[Devops]]></category><category><![CDATA[DevOps Journey]]></category><category><![CDATA[#Devopscommunity]]></category><category><![CDATA[DevOps trends]]></category><category><![CDATA[Devops articles]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[learning]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[#learning-in-public]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Pankil Soni]]></dc:creator><pubDate>Wed, 23 Oct 2024 13:20:42 GMT</pubDate><content:encoded><![CDATA[<p>After getting comfortable with basic Docker concepts yesterday, I dove deep into creating custom Docker images, deploying to AWS, and setting up multi-container applications. Here's my learning journey from Day 2!</p>
<h2 id="heading-1-creating-custom-dockerfiles">1. Creating Custom Dockerfiles 📝</h2>
<p>I created two applications and containerized them:</p>
<ul>
<li><p>A Flask application</p>
</li>
<li><p>An Express.js application</p>
</li>
</ul>
<p>Here's the process I followed:</p>
<ol>
<li><p>Created the applications locally</p>
</li>
<li><p>Wrote Dockerfiles for each</p>
</li>
<li><p>Built custom images</p>
</li>
<li><p>Pushed them to Docker Hub</p>
</li>
</ol>
<p><em># Building an image with host network access</em><br /><code>docker build --network=host -t pankil1812/first-flask-app:0.0.2 .</code></p>
<p><em># Running the containerized application</em><br /><code>docker run -d -p 3000:3000 --name first-flask-app pankil1812/first-flask-app:0.0.2</code></p>
<p><em># Checking container logs</em><br /><code>docker logs first-flask-app</code></p>
<p><em># Cleaning up unused containers</em><br /><code>docker container prune</code></p>
<h2 id="heading-2-aws-ec2-deployment">2. AWS EC2 Deployment 🌩️</h2>
<p>Next, I moved to cloud deployment:</p>
<ol>
<li><p>Created a free-tier EC2 instance on AWS</p>
</li>
<li><p>Installed Docker on the EC2 instance</p>
</li>
<li><p>Successfully deployed both applications</p>
</li>
<li><p>Accessed them via the EC2 public IP</p>
</li>
</ol>
<h2 id="heading-3-multi-container-setup-mongodb-and-mongo-express">3. Multi-Container Setup: MongoDB and Mongo Express 🔄</h2>
<p>The real challenge came with setting up a multi-container application using MongoDB and Mongo Express.</p>
<p>First, pulled the necessary images:</p>
<pre><code class="lang-bash">docker pull mongo docker
pull mongo-express
</code></pre>
<p>Then, created a network and ran the containers:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Create a network for container communication</span>
docker create network mongo-network

<span class="hljs-comment"># Run MongoDB container</span>
docker run --network mongo-network \
  -d -p 27017:27017 \
  -e MONGO_INITDB_ROOT_USERNAME=admin \
  -e MONGO_INITDB_ROOT_PASSWORD=password \
  --name mongo mongo:latest

<span class="hljs-comment"># Run Mongo Express container</span>
docker run --network mongo-network \
  -e ME_CONFIG_MONGODB_ADMINUSERNAME=admin \
  -e ME_CONFIG_MONGODB_ADMINPASSWORD=password \
  -e ME_CONFIG_MONGODB_URL=<span class="hljs-string">"mongodb://admin:password@mongo:27017/"</span> \
  -e ME_CONFIG_BASICAUTH=<span class="hljs-literal">false</span> \
  -d --name my-mongoexpress \
  -p 8081:8081 mongo-express:latest
</code></pre>
<p>But I faced a lot of issues while setting up these because of environment variables. 🤔 But then I tried the new approach of using <strong>ME_CONFIG_MONGODB_URL</strong> instead of <strong>ME_CONFIG_MONGODB_SERVER.</strong> 🚀</p>
<p>But finally I Successfully accessed Mongo Express UI through the EC2 public IP on port 8081! 🎉</p>
<h2 id="heading-4-introduction-to-docker-compose">4. Introduction to Docker Compose 📋</h2>
<p>Finally, I learned about Docker Compose and created two compose files:</p>
<h3 id="heading-express-app-compose-file">Express App Compose File</h3>
<pre><code class="lang-yaml"><span class="hljs-attr">version:</span> <span class="hljs-string">'3'</span>
<span class="hljs-attr">services:</span>
  <span class="hljs-attr">first-express-app:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">pankil1812/first-express-app:0.0.1</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"5000:5000"</span>
</code></pre>
<h3 id="heading-mongodb-and-mongo-express-compose-file">MongoDB and Mongo Express Compose File</h3>
<pre><code class="lang-yaml"><span class="hljs-attr">yamlCopyversion:</span> <span class="hljs-string">'3'</span>
<span class="hljs-attr">services:</span>
  <span class="hljs-attr">mongo:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">mongo</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"27017:27017"</span>
    <span class="hljs-attr">environment:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">MONGO_INITDB_ROOT_USERNAME=admin</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">MONGO_INITDB_ROOT_PASSWORD=password</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">mongo-network</span>

  <span class="hljs-attr">my-mongoexpress:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">mongo-express</span>
    <span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"8081:8081"</span>
    <span class="hljs-attr">environment:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">ME_CONFIG_MONGODB_ADMINUSERNAME=admin</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">ME_CONFIG_MONGODB_ADMINPASSWORD=password</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">ME_CONFIG_MONGODB_URL=mongodb://admin:password@mongo:27017/</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">ME_CONFIG_BASICAUTH=false</span>
    <span class="hljs-attr">depends_on:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">mongo</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">mongo-network</span>

<span class="hljs-attr">networks:</span>
  <span class="hljs-attr">mongo-network:</span>
    <span class="hljs-attr">driver:</span> <span class="hljs-string">bridge</span>
</code></pre>
<p>To implement this:</p>
<ol>
<li><p>Stopped all previous containers</p>
</li>
<li><p>Removed the old network</p>
</li>
<li><p>Used <code>docker-compose -f filename up</code> to start the services</p>
</li>
</ol>
<h2 id="heading-key-learnings">Key Learnings 🎯</h2>
<ol>
<li><p>Building and pushing custom Docker images</p>
</li>
<li><p>Cloud deployment with AWS EC2</p>
</li>
<li><p>Network creation and container communication</p>
</li>
<li><p>Environment variable configuration</p>
</li>
<li><p>Docker Compose for multi-container orchestration</p>
</li>
</ol>
<h2 id="heading-whats-next">What's Next? 🚀</h2>
<p>For Day 3, I'm planning to explore:</p>
<ul>
<li><p>Docker volume management</p>
</li>
<li><p>Container health checks</p>
</li>
<li><p>Docker Compose for development environments</p>
</li>
<li><p>Container orchestration concepts</p>
</li>
</ul>
<p>my github repo for the sources is : <a target="_blank" href="https://github.com/pankil-soni/my-devops-journey">https://github.com/pankil-soni/my-devops-journey</a></p>
<p>the sources where I learned docker from are:</p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=rr9cI4u1_88">https://www.youtube.com/watch?v=rr9cI4u1_88</a> <a target="_blank" href="https://docs.docker.com/">https://docs.docker.com/</a></p>
<p>#Docker #DevOps #AWS #MongoDB #DockerCompose</p>
]]></content:encoded></item><item><title><![CDATA[Day 1 of My DevOps Journey: Getting Started with Docker 🐳]]></title><description><![CDATA[Today marks the beginning of my DevOps learning journey, and I kicked it off by diving into Docker. Here's what I learned and accomplished on my first day.

no more it works on my machine 🚀
Understanding the Basics
First, I grasped the fundamental c...]]></description><link>https://day-1-of-my-devops-journey-docker.hashnode.dev/day-1-of-my-devops-journey-getting-started-with-docker</link><guid isPermaLink="true">https://day-1-of-my-devops-journey-docker.hashnode.dev/day-1-of-my-devops-journey-getting-started-with-docker</guid><category><![CDATA[Docker]]></category><category><![CDATA[docker images]]></category><category><![CDATA[Docker compose]]></category><category><![CDATA[Dockerfile]]></category><category><![CDATA[docker-network]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[learning]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[Express]]></category><dc:creator><![CDATA[Pankil Soni]]></dc:creator><pubDate>Tue, 22 Oct 2024 11:30:15 GMT</pubDate><content:encoded><![CDATA[<p>Today marks the beginning of my DevOps learning journey, and I kicked it off by diving into Docker. Here's what I learned and accomplished on my first day.</p>
<p><img src="https://preview.redd.it/docker-is-born-v0-rq1glermrwu91.jpg?auto=webp&amp;s=3d87067f57d22bdcd574785f53c02992a0492072" alt="Docker is born : r/ProgrammerHumor" /></p>
<p><strong>no more it works on my machine</strong> 🚀</p>
<h3 id="heading-understanding-the-basics">Understanding the Basics</h3>
<p>First, I grasped the fundamental concepts:</p>
<ul>
<li><p><strong>Containers</strong>: Lightweight, standalone packages that include everything needed to run a piece of software, ensuring consistency across different environments.</p>
</li>
<li><p><strong>Docker</strong>: A platform that enables creating, deploying, and running applications using container technology.</p>
</li>
<li><p><strong>Docker Hub</strong>: The official repository for Docker images, like GitHub but for container images.</p>
</li>
</ul>
<h2 id="heading-essential-docker-commands">Essential Docker Commands</h2>
<p>I learned several basic Docker commands that are crucial for container management:</p>
<h3 id="heading-list-all-running-containers">List all running containers</h3>
<p><code>docker ps</code></p>
<h3 id="heading-list-all-docker-images-on-your-system">List all Docker images on your system</h3>
<p><code>docker image ls</code></p>
<h3 id="heading-pull-an-image-from-docker-hub">Pull an image from Docker Hub</h3>
<p><code>docker pull [image-name]</code></p>
<h3 id="heading-remove-containers-or-images">Remove containers or images</h3>
<p><code>docker rm [container-id/name]</code></p>
<h3 id="heading-run-a-container">Run a container</h3>
<p><code>docker run [options] [image-name]</code></p>
<h2 id="heading-hands-on-practice-running-nginx">Hands-on Practice: Running Nginx</h2>
<p>My first practical exercise was setting up an Nginx web server using Docker. Here's how I did it:</p>
<p><code>docker pull nginx</code></p>
<p><code>docker run --name my-nginx -p 8080:80 -d nginx</code></p>
<p>Let's break down this command:</p>
<ul>
<li><p><code>--name my-nginx</code>: Assigns a custom name to the container</p>
</li>
<li><p><code>-p 8080:80</code>: Maps port 8080 on my host to port 80 in the container</p>
</li>
<li><p><code>-d</code>: Runs the container in detached mode (background)</p>
</li>
<li><p><code>nginx</code>: The image to use</p>
</li>
</ul>
<h2 id="heading-connecting-to-docker-playground">Connecting to Docker Playground</h2>
<p>One interesting challenge I tackled was accessing Docker Playground from Windows using Git Bash via SSH. This gave me experience with:</p>
<ul>
<li><p>Remote container management</p>
</li>
<li><p>Using SSH for remote connections</p>
</li>
</ul>
<p><a target="_blank" href="https://stackoverflow.com/a/79113715/24263125">https://stackoverflow.com/a/79113715/24263125</a> refer to my this comment to ssh docker playground instance.</p>
<h2 id="heading-key-takeaways-from-day-1">Key Takeaways from Day 1</h2>
<ol>
<li><p>Docker simplifies application deployment through containerization</p>
</li>
<li><p>Basic Docker commands are intuitive and follow a logical pattern</p>
</li>
<li><p>Port mapping is crucial for accessing containerized applications</p>
</li>
<li><p>Docker Playground provides a great environment for learning</p>
</li>
</ol>
<h2 id="heading-whats-next">What's Next?</h2>
<p>Tomorrow, I plan to explore:</p>
<ul>
<li><p>Create own docker image using as Dockerfile.</p>
</li>
<li><p>Deploying own simple express app.</p>
</li>
<li><p>Multi-container applications.</p>
</li>
<li><p>Docker networking basics.</p>
</li>
</ul>
<p>the resource I used for learning docker is : <a target="_blank" href="https://youtu.be/rr9cI4u1_88?si=s8ehmucFYWfjcci5">https://youtu.be/rr9cI4u1_88?si=s8ehmucFYWfjcci5</a></p>
<p>Stay tuned for more updates on my DevOps journey! Feel free to share your thoughts and suggestions in the comments below.</p>
<p>#Docker #DevOps #Learning #TechBlog</p>
]]></content:encoded></item></channel></rss>