Open source container tools
Total Package
Docker provides the open source tools and resources for compiling, building, and testing containerized applications.
By all accounts, Docker's developer tools have been an important player in the recent history of enterprise IT. Although containers were not new in 2013, the release of the open source Docker platform made containers more accessible to everyday admins by simplifying development and deployment. Docker also helped shape the container landscape by joining with other container industry leaders to establish the Open Container Initiative (OCI), a Linux Foundation project that maintains open industry standards around container formats and runtimes. Docker even contributed runc, the original OCI container runtime, to the foundation in 2015.
In recent years, container technology has proven to be reliable and ubiquitous, resulting in attention shifting to orchestration tools such as Kubernetes.
Docker the company actually sold its Enterprise division to Mirantis in 2019. Included in that sale was the Docker Swarm orchestration platform, which Mirantis has continued to market under the Docker Swarm brand, causing some confusion over what is Docker and what isn't. For instance, some viewers (incorrectly) visualize Docker as somehow competing with Kubernetes, when in fact, Mirantis competes with Kubernetes, and the original Docker container platform is fully integrated into the Kubernetes environment.
Docker's developers are still hard at work, focused on development tools. Their philosophy is that, although it is possible to build a single container on the fly without the need for an enhanced toolset, if you build containers for a living or are concerned with security and consistency in your container creations, you'll need a versatile set of development tools.
Docker remains heavily invested in open source, and several Docker tools are available under open source licenses. This article takes a tour of the container-building tools in the Docker toolset and offers a glimpse at where the company has been putting its energies.
Many of these open source tools have found their way into the Moby Project, an upstream, community-governed project for container components, which Docker founded in 2017. Moby offers a toolkit of components, a framework for assembling these components, and a community for testing and sharing ideas.
Docker Engine
Docker Engine [1], the open source container engine for building containerized applications, forms the core of Docker's developer tool suite. Developed upstream in the Moby Project, Docker Engine uses a client-server architecture (Figure 1). Docker Engine consists of the daemon (dockerd
) and APIs that specify which programs can talk to and instruct the daemon.
Docker's open source CLI client (docker
) interacts with Docker Engine, letting you manage your containers from the command line. It talks to the daemon, which does the work of building, running, and distributing containers. Written in Go, the Docker CLI manages single containers, as well as container images, networks, and volumes. For managing multiple containers, you will need a separate tool, Docker Compose (see below).
For its container runtime, Docker Engine relies on containerd, which manages the container life cycle and handles creating, stopping, and starting your containers (see the containerd section for more information).
Docker Engine also integrates the open source BuildKit component. BuildKit replaced and improved the legacy builder in the release of Docker Engine 23.0. BuildKit offers improvements in performance, storage management, and extensibility. Unlike the legacy builder, which performs builds serially from Dockerfiles (the text file containing all the commands called at the command line to assemble an image), BuildKit allows parallel build processing and introduces support for handling more complex scenarios, such as the ability to detect and skip execution of unused build stages.
Docker Engine binaries are available as DEB or RPM packages for CentOS, Debian, Fedora, Ubuntu, Red Hat Enterprise Linux (RHEL), SUSE Linux Enterprise Server (SLES), and Raspberry Pi OS. Docker also offers a static binary for non-supported Linux distributions, but it is not recommended for production environments.
Docker Compose
If you are looking to define and run multi-container Docker apps, you will need Docker Compose [2]. Available as a plugin for Docker Engine, Docker Compose lets you run a project with multiple containers from a single source.
Docker Compose uses a YAML file to configure your application's services. Once configured, you can use a single command to create and start all of your configuration's services.
Docker Compose provides commands for an application's entire life cycle. You can use Docker Compose in all environments: development, testing, staging, continuous integration (CI), and even production. Because Docker Compose is an abstraction that aligns with developers' mental model of their applications, it particularly supports the inner loop of application development.
A recent addition to Docker Compose is Docker Compose Watch [3]. The Watch feature lets you define a list of rules that will cause an automatic service update when a file is modified. Watch monitors the files in the local directory, rebuilding the application container when necessary so the application stays up to date.
containerd
Docker donated containerd [4], an industry-standard container runtime, to the Cloud Native Computing Foundation (CNCF) in 2017. With an emphasis on simplicity and portability, containerd manages the complete container life cycle on a host – from image transfer and storage to container execution and supervision, to low-level storage and network attachments.
Designed to be embedded in a larger system such as Docker Engine, containerd functions as an internal runtime with minimal runtime requirements. The containerd daemon is available for both Linux and Windows, with most of its interactions with these operating systems' container feature sets being handled by runc or operating system-specific libraries.
By design, containerd works with Docker and Kubernetes, as well as any container platform that wants to abstract syscalls or operating system-specific functionality. Whereas containerd implements the Kubernetes Container Runtime Interface (CRI) for those wanting to run a Kubernetes cluster, you can just as easily use containerd without Kubernetes. However, if you do plan to use Kubernetes, you will want to use containerd v1.5.11 or v1.6.4 to address the recent removal of dockershim from Kubernetes.
You can find containerd as a binary package for the 64-bit architectures Intel AMD, PowerPC Little Endian, and RISC-V, as well as for the S390x architecture.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome Fans Everywhere Rejoice for the Latest Release
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.