Docker Design & Architecture

Docker Design & Architecture

A container is a standard unit of software that packages an application with all of its dependencies and libraries. This makes it easy to deploy applications within containers regardless of hardware configuration or operating system. Unlike virtual machines, containers use the host?OS?rather than bundling an?OS?with the application.

Docker is a container platform. It provides a complete ecosystem of tools to build container images, pull these images from known registries, deploy containers, and manage or orchestrate running containers across a cluster of machines. Docker has popularized container adoption. Even the phrase "dockerize my app" has become common.

The word "Docker" usually refers to its engine. The commercial offering is called?Docker Enterprise. There's also the free community edition that's simply called?Docker Engine. Docker was initially available on Linux but later become available on MacOS and Windows as well

Docker Vs Virtual Machines

Docker provides a consistent runtime across all phases of a product cycle: development, testing, and deployment. For example, if development team has upgraded one dependency, other teams must also do the same. If they don't, app may work during development but fail in deployment or work with unexpected side effects. Docker overcomes this complexity by providing a consistent environment for your app.?Hence, it's become essential for DevOps practice.

Which are the essential components of the Docker ecosystem        
Docker components

The?Docker Engine?is a client-server app of two parts: the?Docker Client?and the?Docker Daemon. Docker commands are invoked using the client on the user's local machine. These commands are sent to daemon, which is typically running on a remote host machine. The daemon acts on these commands to manage images, containers and volumes.

Using?Docker Networking?we can connect Docker containers even if they're running on different machines.?What if your app involves multiple containers? This is where?Docker Compose?is useful. This can start, stop or monitor all services of the app.?What if you need to orchestrate containers across many host machines??Docker Swarm?allows us to do this, basically manage a cluster of Docker Engines.

Docker Machine?is a?CLI?tool that simplifies creation of virtual hosts and install Docker on them.??Docker Desktop?is an application that simplifies Docker usage on MacOS and Windows.

Among the commercial offerings are?Docker Cloud,?Docker Data Center?and?Docker Enterprise Edition.

Which are the command-line interfaces (CLIs) that Docker provides?

Which are the command-line interfaces (CLIs)that Docker provides?        

  • Since Docker has many components, there are also multiple?CLIs:
  • Docker?CLI: This is the basic?CLI?used by Docker clients. For example,?docker pull?is part of this?CLI?with "pull" being the child command. These commands are invoked by user using the Docker Client. Commands are translated to Docker?API?calls that are sent to the Docker Daemon.
  • Docker Daemon?CLI: The Docker Daemon has its own?CLI, which is invoked using the?dockerd?command. For example, the command?$ sudo dockerd -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock &?asks the daemon to listen on both?TCP?and a Unix socket.
  • Docker Machine?CLI: This is invoked with the command?docker-machine.
  • Docker Compose?CLI: This is invoked with the command?docker-compose. This uses Docker?CLI?under the hood.
  • DTR?CLI: Invoked with?docker/dtr, this is the?CLI?for Docker Trusted Registry (DTR).
  • UCP?CLI: Invoked with?docker/dtr, this is the?CLI?for installing and managing Docker Universal Control Plane (UCP) on a Docker Engine.

For more details, read?Dockerfile Reference?and the?best practices for writing Dockerfiles.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了