Docker is an advanced OS virtualization software platform that makes it easier to create, deploy, and run applications in a Docker container.
Docker is a container management service. The keywords of Docker are build, 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.
Docker allows the developers to choose the project-specific deployment environment for each project with a different set of tools and application stacks.
Docker provides flexibility and portability to run an application in various locations, whether on-premises or in a public cloud or a private cloud.
The key benefit of Docker is that it allows users to package an application with all of its dependencies into a standardized unit for software development. Unlike virtual machines, containers do not have high overhead and hence enable more efficient usage of the underlying system and resources.
- Docker – Container LifecycleThe following illustration explains the entire lifecycle of a Docker container.
- Initially, the Docker container will be in the created state.
- Then the Docker container goes into the running state when the Docker run command is used.
- The Docker kill command is used to kill an existing Docker container.
- The Docker pause command is used to pause an existing Docker container.
- The Docker stop command is used to pause an existing Docker container.
- The Docker run command is used to put a container back from a stopped state to a running state.
- Images - The blueprints of our application which form the basis of containers. In the demo above, we used the docker pull command to download the busybox image.
- Containers - Created from Docker images and run the actual application. We create a container using docker run which we did using the busybox image that we downloaded. A list of running containers can be seen using the docker ps command.
- Docker Daemon - The background service running on the host that manages building, running and distributing Docker containers. The daemon is the process that runs in the operating system which clients talk to.
- Docker Client - The command line tool that allows the user to interact with the daemon. More generally, there can be other forms of clients too - such as Kitematic which provide a GUI to the users.
- Docker Hub - A registry of Docker images. You can think of the registry as a directory of all available Docker images. If required, one can host their own Docker registries and can use them for pulling images.