Docker is a platform that enables developers to create, deploy, and manage applications using containers—lightweight, standalone units that bundle an application along with its dependencies, ensuring consistency across different environments. By isolating applications in containers, Docker simplifies the development process, enhances scalability, and promotes resource efficiency, making it easier to deploy software in various settings.
Despite Docker is the most famous container manager, there are some alternatives such as:
Before containers, applications typically ran on virtual machines (VMs) or bare metal servers. VMs were resource-heavy, running full operating systems for each app, while bare metal offered better performance but less flexibility. Many applications were monolithic, making updates and scaling challenging. Configuration management tools like Puppet and Chef helped manage server setups, but environments often varied, leading to deployment issues. Containers streamlined this by providing lightweight, portable environments that ensure consistency across different setups.
An image is a static, read-only package that contains all the necessary components to run an application, including code, libraries, and dependencies, effectively serving as a blueprint or snapshot. In contrast, a container is a running instance of that image, providing an isolated environment where the application executes. While images are immutable and used to create containers, containers are dynamic and can be started, stopped, or destroyed, allowing for efficient application management and scaling.
A container registry is a storage service specifically designed for container images. It allows developers to store, manage, and distribute these images efficiently. Registries can be public, like Docker Hub, or private, enabling organizations to control access to their images. They typically offer features such as version control, access control, and security scanning, ensuring that images are secure and up to date. This facilitates collaboration and deployment across various environments.
To install docker engine, you need to follow the official website at docs.docker.com. At the moment, Docker supports Linux, Windows and macOS.
After installed docker, test it in commandline to make sure it is available:
docker info