{"id":769,"date":"2022-01-25T01:11:00","date_gmt":"2022-01-25T01:11:00","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=769"},"modified":"2022-01-25T01:11:00","modified_gmt":"2022-01-25T01:11:00","slug":"what-is-docker","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=769","title":{"rendered":"What is Docker? How Does it Work?"},"content":{"rendered":"<p>In this comprehensive guide, I have explained what is Docker, its evolution, underlying core Linux concepts, and how it works.<\/p>\n<p>Docker has become the defacto standard when it comes to container-based implementations. Docker is the base for <a href=\"https:\/\/devopscube.com\/docker-container-clustering-tools\/\" rel=\"noreferrer noopener\">container-based orchestration<\/a> from small-scale implementations to large-scale enterprise applications.<\/p>\n<p>Docker gained so much popularity and adoption in the DevOps community quickly because it&#8217;s developed for portability and designed for modern microservice architecture.<\/p>\n<p>In this blog, you will learn,<\/p>\n<ol>\n<li>What is Docker?<\/li>\n<li>Learn about Docker and see why Docker is beneficial and different from other container technologies.<\/li>\n<li>Docker core architecture and its key components<\/li>\n<li>Container evolution and the underlying concept of Linux Containers<\/li>\n<li>What is a container, and what Linux features make it work?<\/li>\n<li>The difference between a process, container, and a VM<\/li>\n<\/ol>\n<p>Here, the idea is to get your basics right to understand what Docker really is and how it works.<\/p>\n<h2 id=\"what-is-docker\">What is Docker?<\/h2>\n<p>Docker is a popular open-source project written in go and developed by Dotcloud (A PaaS Company).<\/p>\n<p>It is a <strong>container engine that uses the Linux Kernel features<\/strong> like namespaces and control groups to create containers on top of an operating system. So you can call it OS-level virtualization.<\/p>\n<p>Docker was initially built on top of <a href=\"#lxc\"><strong>Linux containers (LXC<\/strong><\/a><strong>)<\/strong>. Later Docker replaced LXC with its container runtime libcontainer (now part of <a href=\"https:\/\/github.com\/opencontainers\/runc?ref=devopscube.com\" rel=\"noreferrer noopener\">runc<\/a>). I have explained the core LXC &amp; container concepts towards the end of the article.<\/p>\n<p>You might ask how Docker is different from a Linux Container (LXC) as all the concepts and implementation look similar?<\/p>\n<p>Besides just being a container technology, Docker has well-defined wrapper components that make <strong>packaging applications easy<\/strong>. Before Docker, it was not easy to run containers. Meaning it does all the work to decouple your application from the infrastructure by packing all application system requirements into a container.<\/p>\n<p>For example, if you have a Java jar file, you can run it on any server which has java installed. Same way, once you package a container with required applications using Docker, you can run it on any other host which has Docker installed.<\/p>\n<p>We will have containers up and running by executing a few Docker commands &amp; parameters.<\/p>\n<h3 id=\"difference-between-docker-container\">Difference Between Docker &amp; Container<\/h3>\n<p>Docker is a technology or a tool developed to manage containers efficiently.<\/p>\n<p>So, can I run a container without Docker?<\/p>\n<p>Yes! of course. You can use LXC technology to run containers on Linux servers. In addition, the latest tools like <a href=\"https:\/\/devopscube.com\/podman-tutorial-beginners\/\" rel=\"noreferrer noopener\">Podman<\/a> offers similar workflows like Docker.<\/p>\n<h4 id=\"things-you-should-know-about-docker\">Things you should know about Docker:<\/h4>\n<ol>\n<li>Docker is not LXC<\/li>\n<li>Docker is not a Virtual Machine Solution.<\/li>\n<li>Docker is not a configuration management system and is not a replacement for Chef, Puppet, Ansible, etc.<\/li>\n<li>Docker is not a platform as a service technology.<\/li>\n<li>Docker is not a container.<\/li>\n<\/ol>\n<h2 id=\"what-makes-docker-so-great\">What Makes Docker So Great?<\/h2>\n<p>Docker has an efficient workflow for moving the application from the developer&#8217;s laptop to the test environment to production. You will understand more about it when you look at a practical example of packaging an application into a Docker image.<\/p>\n<p>Do you know that starting a docker container <strong>takes less than a second<\/strong>?<\/p>\n<p>It is incredibly fast, and it can run on any host with compatible Linux Kernel. (Supports Windows as well)<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note:<\/strong><\/b> you cannot run a Windows container on a Linux host because there is no Linux Kernel support for Windows. You can read about Windows containers <a href=\"https:\/\/docs.microsoft.com\/en-us\/virtualization\/windowscontainers\/about\/?ref=devopscube.com\">from here<\/a><\/div>\n<\/div>\n<p>Docker uses a <a href=\"https:\/\/en.wikipedia.org\/wiki\/UnionFS?ref=devopscube.com\" rel=\"noreferrer noopener\">Copy-on-write union file system<\/a> for its image storage. Therefore, when changes are made to a container, only the changes will be written to disk using copy on the write model.<\/p>\n<p>With <a href=\"https:\/\/en.wikipedia.org\/wiki\/Copy-on-write?ref=devopscube.com\" rel=\"noopener\">Copy on write<\/a>, you will have optimized shared storage layers for all your containers.<\/p>\n<h2 id=\"docker-adoption-statistics\">Docker Adoption Statistics<\/h2>\n<p>Here is the google trends data on Docker. You can see it has been an exploding topic for the last five years.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-trends-1.jpg\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"963\" height=\"656\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-trends-1.jpg 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-trends-1.jpg 963w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p>Here is a survey result from Datadog, which shows the rise in Docker adoption.<\/p>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-2018-5-final-v2-jpeg-1.jpg\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1498\" height=\"909\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-2018-5-final-v2-jpeg-1.jpg 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/docker-2018-5-final-v2-jpeg-1.jpg 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-2018-5-final-v2-jpeg-1.jpg 1498w\" sizes=\"auto, (min-width: 720px) 720px\"><figcaption><span style=\"white-space: pre-wrap;\">source: <\/span><a href=\"https:\/\/www.datadoghq.com\/docker-adoption\/?ref=devopscube.com\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"white-space: pre-wrap;\">datadog.com<\/span><\/a><\/figcaption><\/figure>\n<h2 id=\"docker-core-architecture\">Docker Core Architecture<\/h2>\n<p>The following sections will look at the Docker architecture and its associated components. We will also look at how each component works together to make Docker work.<\/p>\n<p>Docker architecture has changed a few times since its inception. When I published the first version of this article, Docker was built on top of LXC<\/p>\n<p>Here are some notable architectural changes that happened for the Docker<\/p>\n<ol>\n<li>Docker moved from LXC to libcontainer in 2014<\/li>\n<li><a href=\"https:\/\/github.com\/opencontainers\/runc?ref=devopscube.com\" rel=\"noreferrer noopener\">runc<\/a> &#8211; a CLI for spinning up containers that follow all OCI specifications.<\/li>\n<li><a href=\"https:\/\/github.com\/containerd\/containerd?ref=devopscube.com\" rel=\"noreferrer noopener\">containerd<\/a> &#8211; Docker separated its container management component to containerd in 2016<\/li>\n<\/ol>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\">OCI: <a href=\"https:\/\/opencontainers.org\/?ref=devopscube.com\" rel=\"noreferrer noopener\">Open Container Initiative<\/a> is an open industry standard for container runtime and specifications.<\/div>\n<\/div>\n<p>When Docker was initially launched, it had a monolithic architecture. Now it is separated into the following three different components.<\/p>\n<ol>\n<li>Docker Engine (dockerd)<\/li>\n<li>docker-containerd (containerd)<\/li>\n<li>docker-runc (runc)<\/li>\n<\/ol>\n<p>Docker and other big organizations contributed to a standard container runtime and management layers. Hence <code>containerd<\/code> and <code>runc<\/code> are now part of the Cloud Native Foundation with contributors from all the organizations.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note:<\/strong><\/b> When <a href=\"https:\/\/devopscube.com\/how-to-install-and-configure-docker\/\" rel=\"noreferrer noopener\">installing Docker<\/a>, all these components get installed. You don&#8217;t have to install it separately. For exaplanation, we are showing it as different components.<\/div>\n<\/div>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-post-1-min-1.png\" class=\"kg-image\" alt=\"docker core architecture\" loading=\"lazy\" width=\"700\" height=\"475\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-post-1-min-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-post-1-min-1.png 700w\"><figcaption><span style=\"white-space: pre-wrap;\">Click to view in HD<\/span><\/figcaption><\/figure>\n<p>Now let&#8217;s have a looks at each Docker component.<\/p>\n<h3 id=\"docker-engine\">Docker Engine<\/h3>\n<p>Docker engine comprises the docker daemon, an API interface, and Docker CLI. Docker daemon (dockerd) runs continuously as <code>dockerd<\/code> systemd service. It is responsible for building the docker images.<\/p>\n<p>To manage images and run containers, <code>dockerd<\/code> calls the <code>docker-containerd<\/code> APIs.<\/p>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/engine-components-flow-min-1.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"492\" height=\"385\"><figcaption><span style=\"white-space: pre-wrap;\">Click to view in HD<\/span><\/figcaption><\/figure>\n<h3 id=\"docker-containerd-containerd\">docker-containerd (containerd)<\/h3>\n<p><code>containerd<\/code> is another system daemon service than is responsible for downloading the docker images and running them as a container. It exposes its API to receive instructions from the <code>dockerd<\/code> service<\/p>\n<h3 id=\"docker-runc\">docker-runc<\/h3>\n<p><code>runc<\/code> is the container runtime responsible for creating the namespaces and cgroups required for a container. It then runs the container commands inside those namespaces. runc runtime is implemented as per the OCI specification.<\/p>\n<p>Read this <a href=\"https:\/\/www.ianlewis.org\/en\/container-runtimes-part-1-introduction-container-r?ref=devopscube.com\" rel=\"noreferrer noopener\">excellent 3 part blog post series<\/a> to understand more about container runtimes.<\/p>\n<h2 id=\"how-does-docker-work\">How Does Docker Work?<\/h2>\n<p>We have seen the core building blocks of Docker.<\/p>\n<p>Now let&#8217;s understand the Docker workflow using the Docker components.<\/p>\n<h3 id=\"docker-components\">Docker Components<\/h3>\n<p>The following official <strong>high-level docker architecture<\/strong> diagram shows the common Docker workflow.<\/p>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-architecture-min-1.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"672\" height=\"351\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-architecture-min-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-architecture-min-1.png 672w\"><figcaption><span style=\"white-space: pre-wrap;\">image source: <\/span><a href=\"https:\/\/docs.docker.com\/?ref=devopscube.com\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"white-space: pre-wrap;\">docs.docker.com<\/span><\/a><\/figcaption><\/figure>\n<p>Docker ecosystem is composed of the following four components<\/p>\n<ol>\n<li>Docker Daemon (dockerd)<\/li>\n<li>Docker Client<\/li>\n<li>Docker Images<\/li>\n<li>Docker Registries<\/li>\n<li>Docker Containers<\/li>\n<\/ol>\n<h3 id=\"what-is-a-docker-daemon\">What is a Docker Daemon?<\/h3>\n<p>Docker has a client-server architecture. Docker Daemon (<code>dockerd<\/code>) or server is responsible for all the actions related to containers.<\/p>\n<p>The daemon receives the commands from the Docker client through CLI or REST API. Docker client can be on the same host as a daemon or present on any other host.<\/p>\n<p>By default, the docker daemon listens to the <code>docker.sock<\/code> UNIX socket. If you have any use case to access the docker API remotely, you need to expose it over a host port. One such use case is <a href=\"https:\/\/devopscube.com\/docker-containers-as-build-slaves-jenkins\/\" rel=\"noreferrer noopener\">running Docker as Jenkins agents<\/a>.<\/p>\n<p>If you want to <a href=\"https:\/\/devopscube.com\/run-docker-in-docker\/\" rel=\"noreferrer noopener\">run Docker inside Docker<\/a>, you can use the <code>docker.sock<\/code> from the host machine.<\/p>\n<h3 id=\"what-is-a-docker-image\">What is a Docker Image?<\/h3>\n<p>Images are the basic building blocks of Docker. It contains the OS libraries, dependencies, and tools to run an application.<\/p>\n<p>Images can be prebuilt with application dependencies for creating containers. For example, if you want to run an Nginx web server as a Ubuntu container, you need to create a Docker image with the Nginx binary and all the OS libraries required to run Nginx.<\/p>\n<h3 id=\"what-is-a-dockerfile\">What is a Dockerfile?<\/h3>\n<p>Docker has a concept of <code>Dockerfile<\/code> that is used for building the image. A Dockerfile a text file that contains one command (instructions) per line.<\/p>\n<p>Here is an example of a Dockerfile.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/dockerfile-example-1.png\" class=\"kg-image\" alt=\"example Dockerfile reference\" loading=\"lazy\" width=\"700\" height=\"475\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/dockerfile-example-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/dockerfile-example-1.png 700w\"><\/figure>\n<p>A docker image is organized in a layered fashion. Every instruction on a <code>Dockerfile<\/code> is added a layer in an image. The topmost writable layer of the image is a container.<\/p>\n<p>Every image is created from a base image.<\/p>\n<p>For example, if you can use a base image of Ubuntu and create another image with the Nginx application. A base image can be a parent image or an image built from a parent image. Check out his <a href=\"https:\/\/docs.docker.com\/develop\/develop-images\/baseimages\/?ref=devopscube.com\" rel=\"noreferrer noopener\">docker article<\/a> to know more about it.<\/p>\n<p>You might ask where this base image (Parent image) comes from? There are docker utilities to create the initial parent base image. It takes the required OS libraries and bakes them into a base image. You don&#8217;t have to do this because you will get the official base images for Linux distros.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-image-layers-1.png\" class=\"kg-image\" alt=\"Docker image layers explained\" loading=\"lazy\" width=\"700\" height=\"475\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-image-layers-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-image-layers-1.png 700w\"><\/figure>\n<p>The top layer of an image is writable and used by the running container. Other layers in the image are read-only.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-image-writable-min-1.png\" class=\"kg-image\" alt=\"Docker image top writable layer\" loading=\"lazy\" width=\"700\" height=\"475\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/docker-image-writable-min-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/docker-image-writable-min-1.png 700w\"><\/figure>\n<h3 id=\"what-is-a-docker-registry\">What is a Docker Registry?<\/h3>\n<p>It is a repository (storage) for Docker images.<\/p>\n<p>A registry can be public or private. For example, Docker Inc provides a hosted registry service called Docker Hub. It allows you to upload and download images from a central location.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note:<\/strong><\/b> By default, when you install docker, it looks for images from the public Docker hub unless you specify a custom registry in Docker settings.<\/div>\n<\/div>\n<p>Other Docker hub users can access all your images if your repository is public. You can also create a private registry in Docker Hub.<\/p>\n<p>Docker hub acts like git, where you can build your images locally on your laptop, commit it, and then be pushed to the Docker hub.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Tip:<\/strong><\/b> When using docker in enterprise networks\/project, set up your own docker registries instead of using the public docker hub. All cloud providers have their own container registry services.<\/div>\n<\/div>\n<h3 id=\"what-is-a-docker-container\">What is a Docker Container?<\/h3>\n<p>Docker Containers are created from existing images. It is a writable layer of the image.<\/p>\n<p>If you try to relate image layers and a container, here is how it looks for a ubuntu-based image.<\/p>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/container-layers-min-1.jpg\" class=\"kg-image\" alt=\"Pictorial representation of a Docker image\" loading=\"lazy\" width=\"675\" height=\"469\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/container-layers-min-1.jpg 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/container-layers-min-1.jpg 675w\"><figcaption><span style=\"white-space: pre-wrap;\">source: <\/span><a href=\"https:\/\/docs.docker.com\/?ref=devopscube.com\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"white-space: pre-wrap;\">docs.docker.com<\/span><\/a><\/figcaption><\/figure>\n<p>You can package your applications in a container, commit it, and make it a golden image to build more containers from it.<\/p>\n<p>Containers can be started, stopped, committed, and terminated. If you terminate a container without committing it, all the container changes will be lost.<\/p>\n<p>Ideally, containers are treated as immutable objects, and it is not recommended to make changes to a running container. Instead, make changes to a running container only for testing purposes.<\/p>\n<p>Two or more containers can be linked together to form tiered application architecture. However, hosting hight scalable applications with Docker has been made easy with the advent of <a href=\"https:\/\/devopscube.com\/docker-container-clustering-tools\/\" rel=\"noreferrer noopener\">container orchestration tools<\/a> like <a href=\"https:\/\/devopscube.com\/kubernetes-tutorials-beginners\/\" rel=\"noreferrer noopener\">kubernetes<\/a>.<\/p>\n<h2 id=\"docker-faqs\">Docker FAQs<\/h2>\n<h2 id=\"what-is-the-difference-between-containerd-runc\">What is the difference between containerd &amp; runc?<\/h2>\n<p>Containerd is responsible for managing the container and runc is responsible for running the containers (create namespaces, cgroups and run commands inside the container) with the inputs from containerd<\/p>\n<h3 id=\"what-is-the-difference-between-the-docker-engine-the-docker-daemon\">What is the difference between the Docker engine &amp; the Docker daemon?<\/h3>\n<p>Docker engine is composed of the docker daemon, rest interface, and the docker CLI. Docker daemon is the systemd dockerd service responsible for building the docker images and sending docker instructions to containerd runtime.<\/p>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>By now, you should have a good understanding of what Docker is and how it works.<\/p>\n<p>The best feature of Docker is collaboration. Docker images can be pushed to a repository and pulled down to any other host to run containers from that image.<\/p>\n<p>Moreover, the Docker hub has thousands of images created by users, and you can pull those images down to your hosts based on your application requirements. Also, it is primarily used in container orchestration tools like kubernetes<\/p>\n<p>Go ahead and <a href=\"https:\/\/devopscube.com\/how-to-install-and-configure-docker\/\">install Docker<\/a> and then you can start building your own docker images. Check out the comprehensive <a href=\"https:\/\/devopscube.com\/build-docker-image\/\" rel=\"noreferrer noopener\">build docker image<\/a> guide to deploy your first container.<\/p>\n<p>If you want to run Docker for production workloads, make sure you follow Docker images&#8217; recommended practices.<\/p>\n<p>You can read my article on <a href=\"https:\/\/devopscube.com\/reduce-docker-image-size\/\" rel=\"noreferrer noopener\">how to reduce docker image size<\/a> where I have listed down all the standard approaches to optimize the docker image.<\/p>\n<p>Also, if you are trying to <a href=\"https:\/\/devopscube.com\/become-devops-engineer\/\" rel=\"noreferrer noopener\">become a DevOps engineer<\/a>, I highly recommend you get hands-on experience with Docker.<\/p>\n<hr>\n<p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/what-is-docker\/\" target=\"_blank\" rel=\"noopener noreferrer\">What is Docker? How Does it Work? \u2014 DevOpsCube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/what-is-docker\/<\/p>\n","protected":false},"author":1,"featured_media":770,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-769","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=769"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/769\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/770"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}