Get to Know Docker's Ecosystem
Trying to take in Docker from ground 0 can be overwhelming. This article explains the purpose of 10 different Docker tools and services.
I remember when I first got into Docker back in 2014 half of these tools didn’t even exist, but it was still difficult to put everything together.
By the time you finish this article you’ll be able to identify all major components of Docker and know how they all fit together.
# Docker Daemon
The Docker Daemon runs on your host operating system. This is typically your main computer or a server on the cloud. It currently only runs on Linux but there are ways to run Docker on MacOS and Windows too.
You can think of this as a service that runs in the background. It is the brains of the operation when it comes to managing Docker containers.
Use case:
Provides core Docker functionality. It must be running on every host you
plan to run Docker on.
# Docker CLI
The Docker CLI is one way to interact with the Docker Daemon. The Docker Daemon exposes an API and the Docker CLI is one tool you can use to consume that API.
It’s imperative that you understand how to use the Docker CLI, but in your day to day activities you’ll likely use another tool called Docker Compose, but that requires knowing how the Docker CLI works.
Use case:
When you want to CRUD (create, read, update, destroy) various components of
Docker, such as your Docker images, containers, networks and volumes.
# Docker Compose
Docker Compose is a quality of life improvement tool over the Docker CLI but still uses the Docker CLI under the hood. It lets you declare Docker CLI commands in the form of YAML and has its own CLI which lets you easily manage 1 or more Docker containers.
Use case:
It lets you quickly spin up and destroy 1 or many containers. It is what you’ll
use in your day to day in development, CI and in some cases even production.
I say “some cases” for production because while Docker Compose is excellent for single server deploys, it’s not really meant for multi-host deploys, however the tool that is aimed at multi-host deploys uses a compatible version of Docker Compose’s YAML file.
If you want to learn how to use the Docker CLI and Docker Compose by example then check out the Dive Into Docker course . It will take you from ground 0 all the way to comfortably using Docker on your own projects.
# Docker for Mac / Windows
This is now known as Docker Desktop.
It’s the de facto standard way of installing Docker on macOS and Windows as long as your computer is capable of running it. It’s a tool that let you install Docker using your OS’ native hypervisor. That is HyperKit on macOS and Hyper-V on Windows.
Update 2020: It works on any version of Windows 10 as long as you have version 1903 or higher with WSL 2. For macOS you’ll be good to go with Mojave or newer as long as you have hardware from 2010+ with an Intel CPU. M1 support is on its way.
It installs the Docker Daemon, Docker CLI and Docker Compose.
Use case:
Allows you to run Docker on non-Linux platforms while offering the closest
experience possible to running Docker natively on Linux.
# Docker Toolbox
The legacy way of installing Docker on macOS and Windows. As of late 2020 it’s officially considered deprecated and receives no more maintenance from Docker.
This should be a last resort move for getting Docker installed on a Windows box that can’t be upgraded to at least version 1903. For macOS, there’s really no need to ever use this tool.
Technically you can still install Docker Toolbox from https://github.com/docker/toolbox/releases but it will not receive newer Docker versions nor is it going to be maintained by Docker.
It is a toolkit that installs the Docker Daemon, Docker CLI, Docker Compose, VirtualBox, Docker Machine, and Docker Quickstart Terminal.
VirtualBox
VirtualBox is used to spin up a Linux VM that the Docker daemon can run in. VirtualBox itself is fully managed by Docker, so you won’t have to interact with it manually.
Docker Quickstart Terminal
A pre-configured terminal that you can use to connect to the Docker Daemon which is running within a remote host (the Linux VM powered by VirtualBox).
Use case:
Allows you to install Docker on macOS and Windows when Docker Desktop isn’t
an option.
Not sure which one to use? Check out the Docker Toolbox vs. Docker for Mac / Windows article.
# Docker Machine
A command line tool that helps you create servers and then install Docker on them.
These servers could be VirtualBox driven VMs (in fact, this is what the Docker Toolbox does), or they could be servers on the cloud. There are adapters for DigitalOcean, AWS and Azure at the moment.
Use case:
Used to quickly spin up new servers that are ready to go with Docker.
It is not an end-all-be-all solution since you’ll often want to modify those
new servers with additional configuration outside the scope of Docker but at the
end of the day it works.
# Docker Hub / Store
The Docker Hub and Docker Store are websites you can visit to find Docker images and even store your own (both publicly and privately). The Docker Store offers a bit more than just Docker images too, such as plugins, various Docker installation binaries and lists any paid services you subscribe to.
Use case:
If you’re looking for nginx, PostgreSQL or hundreds of other Dockerized services,
then the Docker Hub is where you’ll want to start.
You can also push and pull your own Docker images, and sync up builds to GitHub / BitBucket so it works great for helping you distribute your custom Docker images to your servers.
# Docker Swarm
Docker Swarm lets you manage a cluster of servers which can house 1 or more services. You’ll get nifty features such as load balancing, service discovery and rolling updates out of the box.
Use case:
When you want to scale beyond 1 host and need the features it offers. You
can initialize Swarm on any cloud provider capable of running Docker.
# Docker Cloud
Update: This is no longer a solution that Docker offers, but I left its description here since you may come across this term while searching the internet.
Docker Cloud is a paid solution offered by Docker. Its goal is to help you deploy your apps to production without getting bogged down by the details of setting up your own continuous integration pipeline and managing your own Docker Swarm clusters at the server level.
Use case:
When you want to manage your application’s infrastructure with a web UI instead
of rolling your own scripts and worrying about servers. You still need to bring
your own servers but Docker Cloud will manage them for you.
# Docker Data Center
Update: This is also no longer a solution provided by Docker.
Docker Data Center and Docker Enterprise Edition (Docker EE) go hand in hand, because Docker Data Center is now a part of Docker EE. It is another paid offering by Docker.
In a similar fashion to Docker Cloud, it lets you manage your infrastructure through a web UI but unlike Docker Cloud you have the option of running everything on-premises.
It also adds more security features and options for managing your containers vs. Docker Cloud. Not only that but you get Enterprise level support as part of your subscription and even certified infrastructure, containers and plugins.
Use case:
When you have a serious business application and really need the features provided
by DDC.
Let me know if you’re using any of these tools in the comments below.