Docker is an open platform for developing, shipping, and running applications. It separates applications from infrastructure using container technology, similar to how virtual machines separate the operation system from base metal.
Fig.1 Docker illustration
So, what’s the difference between Containers and Virtual Machines?
Basically, VM takes Guest OS as part of the application which may weight a lot. It would decrease the portability and introduce fat requirements into the application.
Docker virtualises the OS instead. Only the application and all dependencies are contained which makes it fast, portable and the users don’t have to worry about the OS part(it’s outside of the container).
We can see how fabulous docker container is from a nice and neat from.
Docker engine, runs on the host machine, listens for Docker API requests, and manages Docker objects such as images, containers, networks, and volumes.
Docker client:
The Docker client(CLI) is the primary way that many Docker users interact with Docker.
(ex: docker run, docker pull, docker build)
Docker Workflow Components:
Docker Image:
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization.(Like onion)
Fig. 4 Docker images
Commands:
Check current existing images
docker images
Check all existing images(including intermediate images)
What is Docker:
Docker Components:
docker images
docker images -a
docker rmi [OPTIONS] IMAGE [IMAGE...]