Docker Introduction

Docker
Docker is a container management service. The keywords of Docker are develop, ship and run anywhere. The whole idea of Docker is for developers to easily develop applications, ship them into containers which can then be deployed anywhere.
Components of Docker
Docker has the following components
· Docker for Mac – It allows one to run Docker containers on the Mac OS.
· Docker for Linux - It allows one to run Docker containers on the Linux OS.
· Docker for Windows - It allows one to run Docker containers on the Windows OS.
· Docker Engine – It is used for building Docker images and creating Docker containers.
· Docker Hub – This is the registry which is used to host various Docker images.
· Docker Compose – This is used to define applications using multiple Docker containers.
Images - The file system and configuration of our application which are used to create containers. They are executable packages (bundled with application code & dependencies, software packages, etc.) for the purpose of creating containers.
Containers - Running instances of Docker images — containers run the actual applications. A container includes an application and all of its dependencies. It shares the kernel with other containers, and runs as an isolated process in user space on the host OS.
· Docker container doesn’t require the installation of a separate operating system. Docker just relies or makes use of the kernel’s resources and its functionality to allocate them for the CPU and memory it relies on the kernel’s functionality and uses resource isolation for CPU and memory, and separate namespaces to isolate the application’s view of the OS (operating system).

Docker Architecture Overview
Docker client - The command line tool that allows the user to interact with the Docker daemon.
Docker daemon - The background service running on the host that manages building, running and distributing Docker containers.
Docker Store -Store is, among other things, a registry of Docker images. You can think of the registry as a directory of all available Docker images.
Rest Api: The REST API acts as a bridge between the daemon and the client. Any command issued using the client passes through the API to finally reach the daemon.
This flow will help you understanding it better.


Docker Image: images are multi-layered read-only files carrying your application in a desired state inside them. container blueprint or template file.
Docker Registry: An image registry is a centralized place where you can upload your images and can also download images created by others. Docker Hub is the default public registry for Docker. Another very popular image registry is Quay by Red Hat.
In the past, different container engines had different image formats. But later on, the Open Container Initiative (OCI) defined a standard specification for container images which is complied by the major containerization engines out there. This means that an image built with Docker can be used with another runtime like Podman without any additional hassle.
docker container run --publish 8080:80 fhsinchy/hello-dock
how to publish a port: --publish <host port>:<container port>
When you wrote --publish 8080:80 in the previous sub-section, it meant any request sent to port 8080 of your host system will be forwarded to port 80 inside the container.
Detached Mode: --detach is used to run container as background.
docker container ls
Docker Swarm is Docker’s native, open-source container orchestration platform that is used to cluster and schedule Docker containers. Swarm differs from Kubernetes in the following ways:
· Docker Swarm can’t do auto-scaling (as can Kubernetes); however, Docker scaling is five times faster than Kubernetes
· Docker Swarm doesn’t have a GUI; Kubernetes has a GUI in the form of a dashboard
· Docker requires third-party tools like ELK stack for logging and monitoring, while Kubernetes has integrated tools for the same
· Docker Swarm can share storage volumes with any container easily, while Kubernetes can only share storage volumes with containers in the same pod
· Docker can deploy rolling updates but can’t deploy automatic rollbacks; Kubernetes can deploy rolling updates as well as automatic rollbacks
Promote this post
Share & amplify
LinkedIn post generator
Generate a polished, professional LinkedIn post from this article. Edit before posting.

Comments (0)