What is Docker Images?
Docker is a platform for developers and system admins to develop, deploy, and run applications with containers. A Docker image we are going to talk about contains everything needed to run an application as a container.
This is the second part of our series on software deployment, If you are not familiar with the concept of software deployment then make sure to check out our cool piece on it.
If you already know what is docker but you are not quite sure how you can use it, check out our next article on the CI/CD pipeline.
Virtual Machines VS. Containers
Before talking about Docker images it’s a good idea to shed light on the difference between virtual machines and containers.
Virtual Machines (VM)
Virtual machines exist as complete standalone environments (quite literally “virtual” hardware).
A VM utilizes its own BIOS, software-network adapters (in turn these use the host’s adapters), disk storage (a file on the host machine), a CPU, RAM, and a complete OS.
Containers exist to run a single application, allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. Every container shares the exact same OS, reducing the overhead to the host system.
What is Docker Container?
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.
Thanks to the container, the developer can rest assured that the application will run on any other machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.
What are Docker Images?
You can think of a Docker image as a Virtual Machine snapshot. An image is everything Docker needs in order to start a Docker container in a specific state.
More precisely, a Docker image is a file, comprised of multiple layers, A user composes each Docker image to include system libraries, tools, and other files and dependencies for the executable code in a Docker container. An image is essentially built from the instructions for a complete and executable version of an application, which relies on the host OS kernel. When the Docker user runs an image, it becomes one or multiple instances of that container.
In this post, we talked briefly about containers and what differentiates them from virtual machines, we talked specifically about Docker containers and the docker images.