<?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: Sugash Srimari R</title>
    <description>The latest articles on DEV Community by Sugash Srimari R (@sugashsm).</description>
    <link>https://dev.to/sugashsm</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2201159%2F7b2b1671-436b-45ae-be6c-1eafd879c70e.jpg</url>
      <title>DEV Community: Sugash Srimari R</title>
      <link>https://dev.to/sugashsm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sugashsm"/>
    <language>en</language>
    <item>
      <title>DOCKER BASICS FOR BEGINNER</title>
      <dc:creator>Sugash Srimari R</dc:creator>
      <pubDate>Thu, 20 Feb 2025 06:36:11 +0000</pubDate>
      <link>https://dev.to/sugashsm/docker-basics-for-beginner-2e86</link>
      <guid>https://dev.to/sugashsm/docker-basics-for-beginner-2e86</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In today's fast-paced development world, Docker has become an essential tool for developers. Whether you're building web applications, microservices, or AI-powered tools, Docker simplifies deployment and ensures consistency across environments. If you're new to Docker, this guide will help you get started with the basics!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   docker &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run a test container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   docker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Docker Concepts
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Images:&lt;/strong&gt; Blueprints for containers, stored in Docker Hub or locally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Containers:&lt;/strong&gt; Running instances of images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dockerfile:&lt;/strong&gt; A script containing instructions to build an image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volumes:&lt;/strong&gt; Persistent storage for containers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networks:&lt;/strong&gt; Enable communication between containers.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ul&gt;
&lt;li&gt;List running containers:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start a container:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 8080:80 nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Stop a container:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  docker stop &amp;lt;container_id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Remove a container:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  docker &lt;span class="nb"&gt;rm&lt;/span&gt; &amp;lt;container_id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Build an image from a Dockerfile:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  docker build &lt;span class="nt"&gt;-t&lt;/span&gt; myapp &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creating Your First Dockerized Application
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;Dockerfile&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;   FROM node:18
   WORKDIR /app
   COPY . .
   RUN npm install
   CMD ["npm", "start"]
   EXPOSE 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Build and run your container:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   docker build &lt;span class="nt"&gt;-t&lt;/span&gt; mynodeapp &lt;span class="nb"&gt;.&lt;/span&gt;
   docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 3000:3000 mynodeapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Docker is a game-changer for modern development. With just a few commands, you can containerize your applications, making them portable, scalable, and easy to deploy. Start experimenting with Docker today and streamline your development workflow!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>kubernetes</category>
    </item>
  </channel>
</rss>
