<?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: Shantanu Raj</title>
    <description>The latest articles on DEV Community by Shantanu Raj (@shantanuspace).</description>
    <link>https://dev.to/shantanuspace</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%2F3636815%2F28c16ffe-7b12-48f8-bb4f-390d09c2e335.jpg</url>
      <title>DEV Community: Shantanu Raj</title>
      <link>https://dev.to/shantanuspace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shantanuspace"/>
    <language>en</language>
    <item>
      <title>Learning Docker DAY1</title>
      <dc:creator>Shantanu Raj</dc:creator>
      <pubDate>Wed, 28 Jan 2026 14:36:21 +0000</pubDate>
      <link>https://dev.to/shantanuspace/learning-docker-day1-5dh7</link>
      <guid>https://dev.to/shantanuspace/learning-docker-day1-5dh7</guid>
      <description>&lt;p&gt;The main focus of the article  will be the application phase of Docker,you already know what docker is and if you unaware then you can look &lt;a href="https://docs.docker.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How docker is actually used in Development
&lt;/h2&gt;

&lt;p&gt;Have you ever faced a situation where a project works perfectly on your system, but fails on someone else’s?&lt;/p&gt;

&lt;p&gt;I faced this during my college project presentation. My laptop wasn’t available, so I tried running the project on a friend’s laptop. The project failed because of a Node.js version mismatch — my project used a newer version, while my friend had an older one installed. I had to manually install the correct version and fix dependencies. It was a hectic process. Later, I realized Docker would have completely solved this problem.&lt;/p&gt;

&lt;p&gt;Developer mainly use to solve "Running in your computer but not on mine problem ".&lt;br&gt;
Docker use to standardize that installation problem ,now you do not have to worry about the hefty task of installing all dependencies manually or solving version conflict in the deps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Docker Concepts
&lt;/h2&gt;

&lt;p&gt;Docker file - it is  recipe for making Docker image.&lt;br&gt;
Docker image - A packaged snapshot containing your app, dependencies, and runtime.&lt;br&gt;
Docker container - it is the running state of your Docker image .&lt;br&gt;
Docker Hub - it is like github for DockerImage.&lt;br&gt;
Docker compose - it  is file that helps to run  multiple container and communicate with each other. without docker compose , you have to run each container separately. But with docker compose , you can run using single cmd. &lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Docker Commands
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Build an image
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t Frontendimg:01 .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd build a docker image named Frontendimg with tag of 01 from the dockerfile in current directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run a container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d -p 3000:3000  --name "myrandomname" cd214912421
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd  create the container from the given image . &lt;br&gt;
--name -&amp;gt; this helps to give container a name.&lt;br&gt;
-d  -&amp;gt; allow terminal to work in detach mode , if not used terminal will be busy and you will not be able to use the current terminal .&lt;br&gt;
-p  -&amp;gt; port mapping hostport:containerport , in short you will be able to visit your project in  &lt;a href="https://localhost:3000" rel="noopener noreferrer"&gt;https://localhost:3000&lt;/a&gt;.&lt;br&gt;
cd214912421 -&amp;gt; this is image id of which you need to create a container. You can use image name in the image id place.&lt;/p&gt;

&lt;h2&gt;
  
  
  List Docker Image
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker image ls -a 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd list all image that is created by you ,-a ensure it also include the untagged image.&lt;/p&gt;

&lt;h2&gt;
  
  
  List container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All container which is running ,exist or exited.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop Container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker stop &amp;lt;container id or name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd is used to stop the container .&lt;/p&gt;

&lt;h2&gt;
  
  
  Remove Container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rm &amp;lt;container id or name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd delete the container which is stopped but still exist. it can only run if that container is not running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Remove all stopped containers
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker container prune  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd will remove/delete all stopped container&lt;/p&gt;

&lt;h2&gt;
  
  
  Remove an image
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker rmi imagenameorimageid  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This cmd will delete existing image.&lt;/p&gt;

&lt;h2&gt;
  
  
  Important points
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;You can build multiple images for different versions of your project.&lt;/li&gt;
&lt;li&gt;Changing source code doesn’t require changing the Dockerfile unless dependencies change.&lt;/li&gt;
&lt;li&gt;You can run multiple containers from the same image on different ports.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Docker Matters
&lt;/h2&gt;

&lt;p&gt;Docker ensures that everyone runs the project in the exact same environment, from development to production.&lt;br&gt;
This makes collaboration smoother and deployment reliable — which is why Docker is widely used in DevOps and modern software teams.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Really appreciate your insight on this, tell me if I am wrong somewhere.&lt;br&gt;
By Saturday ,I will post about DockerFile and DockerCompose .&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
