Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files. All containers are run by a single operating-system kernel and are thus more lightweight than virtual machines. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine. It was first started in 2013 and is developed by Docker, Inc
Docker Inc is a company based in San Francisco and founded by Solomon Hykes. Initially the company called dotCloud started as a PaaS Provider and leveraged Linux Containers. The internal tool used to manage containers was nick-named docker and in 2013 dotCloud was rebranded as Docker.
The Runtime and Orchestration Engine Enterprise Edition (EE) & Community Edition (CE). Both are released quarterly.
The Open-Source Project called Moby (https://github.com/moby/moby) is the upstream project of Docker and breaks Docker down into more modular components
Docker Use Cases are Dev/Prod parity, Simplifying Configuration and Code Pipeline Management
- Dev/Prod parity: Dev and Production environment are the same and bugs in Production can be replicated in Development
- Simplifying Configuration: Just put your environment and configuration into code and deploy it and allows the same Docker configuration to be used in a variety of environments. Decouples infrastructure requirements from the application environment
- Code Pipeline Management: Build standards and repeatable processes, Developer Productivity, App Isolation, Server Consolidation, Debugging Capabilities and Multi-tenancy
Docker architecture – Client-server architecture, Client talks to the Docker daemon which handles building, running and distributing. Communication using a REST API (UNIX sockets & Network interface). The Docker daemon (dockerd) listens for Docker API requests and manages Docker objects Images, Containers, Networks and Volumes
The Docker client (docker) allows users to interact with docker and this sends commands to dockerd. Docker registries Stores Docker images (Private (your own) and public (DockerHub))
Docker objects Images are the read-only template with instructions for creating a Docker container. You can create your own images, Dockerfile (to build images) and publish to registry. Containers are the runnable instance of an image. You can connect a container to networks and attach storage. You can also create a new image based on its current state.
Docker swarm is a container orchestration tool, meaning that it allows the user to manage multiple containers deployed across multiple host machines. You can Scale containers across multiple Docker daemons and also load balance the service.
Docker Engine supports the tasks and workflows involved to build, ship and run container-based applications. The engine creates a server-side daemon process that hosts images, containers, networks and storage volumes. The major components are Docker client, Docker daemon, containerd and runc (Shim Process)
When creating a new container – Docker Client (API Payload)- Doker Daemon (gRPC a CRUD style API) – Containerd (Creates an OCI bundle). Runc (interfaces with OS kernel and constructs including namespace, cgroups etc. Container process starts as a child process and runc exits once the container starts
Docker Images are made of multiple layers built from the instructions which execute code in a Docker container. Each layer represents an instruction in the image’s Dockerfile. Each layer except the very last one is read-only.
Docker Hub is the world’s largest library and community for container images provided by Docker. You can browse over 100000+ container images from software vendors, open-source projects, and the community. Features include Repositories, Teams and Organizations, Official Images, Publisher Images, Builds and Webhooks. https://hub.docker.com/