<?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: Misha</title>
    <description>The latest articles on DEV Community by Misha (@misha_8ed8a8264b25bdc3a9c).</description>
    <link>https://dev.to/misha_8ed8a8264b25bdc3a9c</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%2F3898014%2F0d5bb154-f604-4f12-b63c-c3e9bd9386e1.png</url>
      <title>DEV Community: Misha</title>
      <link>https://dev.to/misha_8ed8a8264b25bdc3a9c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/misha_8ed8a8264b25bdc3a9c"/>
    <language>en</language>
    <item>
      <title>Docker 101: How I Mastered Docker Build Processes In One Night</title>
      <dc:creator>Misha</dc:creator>
      <pubDate>Mon, 27 Apr 2026 22:55:15 +0000</pubDate>
      <link>https://dev.to/misha_8ed8a8264b25bdc3a9c/docker-101-how-i-mastered-docker-build-processes-in-one-night-3619</link>
      <guid>https://dev.to/misha_8ed8a8264b25bdc3a9c/docker-101-how-i-mastered-docker-build-processes-in-one-night-3619</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Docker Competencies: Part 1/3 (BASIC)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;From "I've heard of it" to "I can ship it"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 1: Create a Multi-Stage Build&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write a Dockerfile for an app that uses a heavy build image (like node:latest) to install dependencies, but then copies only the necessary production files into a slim runtime image (like node:alpine).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Goal:&lt;/strong&gt; Compare the final image sizes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource:&lt;/strong&gt; &lt;a href="https://devopscube.com/reduce-docker-image-size/" rel="noopener noreferrer"&gt;More ways to reduce image size&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4jmf2uk3wg9t0a2p3u4s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4jmf2uk3wg9t0a2p3u4s.png" alt="Img" width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 2: The "Bridge Network" Handshake&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy two containers: an API container (e.g., Flask/Express) and a UI container (Nginx-based).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Goal:&lt;/strong&gt; Create a custom Docker network and ensure the containers can communicate using the container name as the hostname, rather than a hardcoded IP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Concept:&lt;/strong&gt; Containers should talk via names, not unstable IP addresses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource:&lt;/strong&gt; &lt;a href="https://docs.docker.com/engine/network/drivers/bridge/" rel="noopener noreferrer"&gt;Docker Bridge Network&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frky9rl1fcuwl7cd3jf3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frky9rl1fcuwl7cd3jf3j.png" alt="Img" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 3: "Legacy to Linux" Migration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take a basic HTML/JS frontend that runs locally and containerize it using Nginx.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Goal:&lt;/strong&gt; Inject an environment variable into the container to change the background color of the UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimization:&lt;/strong&gt; Use a .dockerignore file to ensure node_modules or local logs aren't accidentally copied into the image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource:&lt;/strong&gt; &lt;a href="https://moldstud.com/articles/p-migrate-legacy-apps-to-docker-on-linux-step-by-step" rel="noopener noreferrer"&gt;Migrate Legacy Apps to Docker&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffontfyonyb2lospyyzt1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffontfyonyb2lospyyzt1.jpg" alt="Img" width="528" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 4:&lt;/strong&gt; Master Container Lifecycle Commands&lt;/p&gt;

&lt;p&gt;Execute the following sequence to master the CLI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Detached Mode:&lt;/strong&gt; Run a Redis container in the background: docker run --name my-cache -d redis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port Mapping:&lt;/strong&gt; Map port 6379 of the container to 7000 on your host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restart Policy:&lt;/strong&gt; Run a container with --restart unless-stopped and manually restart your Docker Desktop/Daemon to see if it recovers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Cleanup:&lt;/strong&gt; Run a temporary "Hello World" container with the --rm flag to ensure it deletes itself after execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fd33wubrfki0l68.cloudfront.net%2F25491ef22ebfd50575d20d0bb0365deed7cf5be3%2Fc0453%2Fimg%2Fblog%2F2022%2F07%2Fdocker_container_lifecycle_3x.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fd33wubrfki0l68.cloudfront.net%2F25491ef22ebfd50575d20d0bb0365deed7cf5be3%2Fc0453%2Fimg%2Fblog%2F2022%2F07%2Fdocker_container_lifecycle_3x.webp" alt="Img" width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 5: Deploy to a Docker Registry&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a repository on Docker Hub or GitHub Packages.&lt;/li&gt;
&lt;li&gt;Tag your local image: docker tag  /:v1.0.&lt;/li&gt;
&lt;li&gt;Authenticate via CLI (docker login) and push the image.&lt;/li&gt;
&lt;li&gt;Delete the local image and pull it back down to prove it’s stored in the cloud.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvewzaxnl1vxqvlpz77c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flvewzaxnl1vxqvlpz77c.png" alt="Img" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 6: Cross-Platform .NET Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a standard .NET 8 (or 6/7) Web API.&lt;/li&gt;
&lt;li&gt;Build it using a &lt;strong&gt;Linux-based SDK&lt;/strong&gt; image.&lt;/li&gt;
&lt;li&gt;Switch Docker Desktop to "Windows Container" mode and build using &lt;strong&gt;Windows Server Core&lt;/strong&gt; or &lt;strong&gt;Nano Server.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Goal:&lt;/strong&gt; Observe the difference in startup time and image size between native Windows and Linux-based containers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.einfochips.com%2Fwp-content%2Fuploads%2F2024%2F04%2FDocker-Decisions-3.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.einfochips.com%2Fwp-content%2Fuploads%2F2024%2F04%2FDocker-Decisions-3.webp" alt="Img" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🛠️ Pro-Tips: Working in Neovim&lt;/strong&gt;&lt;br&gt;
If you live in the terminal, you can manage Docker without leaving your editor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin Support:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;nvim-docker:&lt;/em&gt; Provides a UI to list, start, stop, and delete containers (use r for restart, t for logs).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;denops-docker.vim:&lt;/em&gt; Manage images/containers and search Docker Hub directly from Neovim.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;devops-tools.nvim:&lt;/em&gt; Adds handy commands like :DockerPs and :DockerImages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LSP &amp;amp; Syntax:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install the *&lt;em&gt;Docker Language Server *&lt;/em&gt;(via Mason) for autocompletion, linting, and hover documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminal Integration:&lt;/strong&gt; Open a terminal inside a split (:term) to run Docker commands while editing your Dockerfile.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lazy Management:&lt;/strong&gt; Use lazydocker (a TUI for Docker) and toggle it inside Neovim using toggleterm.nvim.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Note:&lt;/strong&gt; For Task 6, you can even install Neovim inside your dev container. Tools like** DevPod &lt;strong&gt;or&lt;/strong&gt; nvim-remote-containers **allow you to edit files directly inside a running Docker environment.&lt;/p&gt;

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