Get to know Docker
What is Docker?
Docker is an open-source platform for Building, Deploying, and managing applications. It enables developers to Package applications into containers.
What’s a container you ask? A Container bundles an application’s code together with the related configuration files and libraries, and with the dependencies required for the app to run. This allows developers and IT pros to deploy applications seamlessly across environments.
Developers can create containers without docker too, but why would you want to skip out when this platform makes it easier, simpler, and safer to build, deploy and manage containers? Docker is essentially a toolkit that enables developers to build, deploy, run, update, and stop containers using simple commands and work-saving automation through a single API.
Why Docker?
Alright, now that you know what docker is, let’s get to why you would want to use this platform. The first container-related technology was available for decades before Docker was released. Most notably, in 2008, LinuXContainers (LXC) was implemented in the Linux kernel, fully enabling virtualization for a single instance of Linux. While LXC is still used today, newer technologies using the Linux kernel are available.
Docker enhanced the native Linux containerization capabilities with technologies that enable:
Improved — and seamless — portability:
- While LXC containers often reference machine-specific configurations, Docker containers run without modification across any desktop, data center, and cloud environment.
Even lighter weight and more granular updates:
- With LXC, multiple processes can be combined within a single container.
- With Docker containers, only one process can run in each container. This makes it possible to build an application that can continue running while one of its parts is taken down for an update or repair.
Automated container creation:
- Docker can automatically build a container based on application source code.
Container versioning:
- Docker can track versions of a container image, roll back to previous versions, and trace who built a version and how. It can even upload only the deltas between an existing version and a new one.
Container reuse:
- Existing containers can be used as base images — essentially like templates for building new containers.
Shared container libraries:
- Developers can access an open-source registry containing thousands of user-contributed containers.
Today, Docker containerization also works with Microsoft Windows servers. Most cloud providers offer specific services to help developers build, ship, and run applications containerized with Docker.
Docker Terms you might encounter
DockerFile
Every Docker container starts with a simple text file containing instructions for how to build the Docker container image. DockerFile automates the process of Docker image creation. It’s essentially a list of command-line interface (CLI) instructions that Docker Engine will run in order to assemble the image.
Docker images
Docker images contain executable application source code as well as all the tools, libraries, and dependencies that the application code needs to run as a container. When you run the Docker image, it becomes one instance (or multiple instances) of the container.
Docker containers
Docker containers are the live, running instances of Docker images. While Docker images are read-only files, containers are live, ephemeral, executable content. Users can interact with them, and administrators can adjust their settings and conditions using docker commands.
Docker Hub
Docker Hub is the public repository of Docker images that calls itself the “world’s largest library and community for container images.” It holds over 100,000 container images sourced from commercial software vendors, open-source projects, and individual developers. It includes images that have been produced by Docker, Inc., certified images belonging to the Docker Trusted Registry, and many thousands of other images.
All Docker Hub users can share their images at will. They can also download predefined base images from the Docker filesystem to use as a starting point for any containerization project.
Docker daemon
Docker daemon is a service running on your operating systems, such as Microsoft Windows or Apple macOS, or iOS. This service creates and manages your Docker images for you using the commands from the client, acting as the control center of your Docker implementation.
Docker registry
A Docker registry is a scalable open-source storage and distribution system for docker images. The registry enables you to track image versions in repositories, using tagging for identification. This is accomplished using git, a version control tool.
Fun fact: Docker is built for Developers, by Developers