Day 1/40
Docker Tutorial For Beginners - Docker Fundamentals
Docker Architecture
GitHub link - https://github.com/SUBHAM-NANDI/40DaysKubernetes/tree/f6cf37cbe7f8a4c550bad5641f6a92fe4ee8ebed/Day%201
Components:
Client: The interface through which a user interacts with Docker. Commands like
docker build
,docker push
,docker pull
, anddocker run
are issued from here.Docker Host: The machine where Docker is installed. It hosts the Docker Daemon, images, and containers.
Docker Daemon (dockerd): The background service that manages Docker objects (such as images, containers, networks, and volumes) and listens for Docker API requests.
Dockerfile: A text file that contains instructions to build a Docker image. It includes steps like installing software, copying files, and setting up the environment.
Docker Registry: A storage and distribution system for Docker images. Docker Hub is the default registry, but private registries can also be used.
Docker Image: A lightweight, standalone, and executable package that includes everything needed to run a piece of software, including the code, a runtime, libraries, and settings.
Docker Container: A runnable instance of a Docker image. Containers are isolated environments that share the OS kernel but are otherwise independent.
Workflow Steps:
docker build
(Step 1): The client sends adocker build
command to the Docker Daemon. The Docker Daemon reads the Dockerfile (Step 2) to create a Docker Image (Step 3).Docker Daemon processes Dockerfile (Step 2): The Dockerfile is read by the Docker Daemon, which executes the instructions to build an image.
Docker Image Creation (Step 3): Once the Dockerfile is processed, a Docker Image is created.
docker push
(Step 4): The client sends adocker push
command to the Docker Daemon, instructing it to push the Docker Image to a Docker Registry (Step 5).Docker Registry (Step 5): The Docker Image is stored in the Docker Registry, making it available for others to pull and use.
docker pull
(Step 6): The client sends adocker pull
command to the Docker Daemon, which pulls the Docker Image from the Docker Registry to the Docker Host.docker run
(Step 7): The client issues adocker run
command, and the Docker Daemon creates a Docker Container (Step 9) from the Docker Image.Docker Container Creation (Step 9): The Docker Daemon uses the Docker Image to create a Docker Container, which is then executed.
Top comments (0)