Professional Documents
Culture Documents
f r VCdI
SP
+
Build a custom app to
dE
e e AL
monitor your portfolio
Low-Code Tools
Save money by keeping
it simple
w w w. l i n u x - m a g a z i n e . c o m
10 f O S S f i n d S!
IN-DEPTH
Docker Open Source Developer Tools
Total Package
Docker provides the open source tools and resources for compiling, building,
and testing containerized applications. By Amy Pettle
B
y all accounts, Docker’s devel- Docker the company actually sold its Docker remains heavily invested in
oper tools have been an im- Enterprise division to Mirantis in 2019. open source, and several Docker tools
portant player in the recent Included in that sale was the Docker are available under open source licenses.
history of enterprise IT. Al- Swarm orchestration platform, which This article takes a tour of the container-
though containers were not new in Mirantis has continued to market under building tools in the Docker toolset and
2013, the release of the open source the Docker Swarm brand, causing some offers a glimpse at where the company
Docker platform made containers more confusion over what is Docker and what has been putting its energies.
accessible to everyday admins by sim- isn’t. For instance, some viewers (incor- Many of these open source tools have
plifying development and deployment. rectly) visualize Docker as somehow found their way into the Moby Project,
Docker also helped shape the container competing with Kubernetes, when in an upstream, community-governed
landscape by joining with other con- fact, Mirantis competes with Kubernetes, project for container components,
tainer industry leaders to establish the and the original Docker container plat- which Docker founded in 2017. Moby
Open Container Initiative (OCI), a form is fully integrated into the Kuber- offers a toolkit of components, a frame-
Lead Image © Alexander Bedrin, 123RF.com
Linux Foundation project that main- netes environment. work for assembling these components,
tains open industry standards around Docker’s developers are still hard at and a community for testing and shar-
container formats and runtimes. work, focused on development tools. Their ing ideas.
Docker even contributed runc, the orig- philosophy is that, although it is possible
inal OCI container runtime, to the to build a single container on the fly with- Docker Engine
foundation in 2015. out the need for an enhanced toolset, if Docker Engine [1], the open source con-
In recent years, container technology you build containers for a living or are tainer engine for building containerized
has proven to be reliable and ubiquitous, concerned with security and consistency applications, forms the core of Docker’s
resulting in attention shifting to orches- in your container creations, you’ll need a developer tool suite. Developed up-
tration tools such as Kubernetes. versatile set of development tools. stream in the Moby Project, Docker
Engine uses a client-server architecture allows parallel build processing and in- developers’ mental model of their appli-
(Figure 1). Docker Engine consists of the troduces support for handling more cations, it particularly supports the inner
daemon (dockerd) and APIs that specify complex scenarios, such as the ability loop of application development.
which programs can talk to and instruct to detect and skip execution of unused A recent addition to Docker Compose
the daemon. build stages. is Docker Compose Watch [3]. The
Docker’s open source CLI client Docker Engine binaries are available Watch feature lets you define a list of
(docker) interacts with Docker Engine, as DEB or RPM packages for CentOS, rules that will cause an automatic ser-
letting you manage your containers from Debian, Fedora, Ubuntu, Red Hat Enter- vice update when a file is modified.
the command line. It talks to the dae- prise Linux (RHEL), SUSE Linux Enter- Watch monitors the files in the local
mon, which does the work of building, prise Server (SLES), and Raspberry Pi directory, rebuilding the application
running, and distributing containers. OS. Docker also offers a static binary for container when necessary so the appli-
Written in Go, the Docker CLI manages non-supported Linux distributions, but it cation stays up to date.
single containers, as well as container is not recommended for production
images, networks, and volumes. For environments. containerd
managing multiple containers, you will Docker donated containerd [4], an in-
need a separate tool, Docker Compose Docker Compose dustry-standard container runtime, to
(see below). If you are looking to define and run the Cloud Native Computing Foundation
For its container runtime, Docker En- multi-container Docker apps, you will (CNCF) in 2017. With an emphasis on
gine relies on containerd, which man- need Docker Compose [2]. Available as a simplicity and portability, containerd
ages the container life cycle and handles plugin for Docker Engine, Docker Com- manages the complete container life
creating, stopping, and starting your pose lets you run a project with multiple cycle on a host – from image transfer
containers (see the containerd section containers from a single source. and storage to container execution and
for more information). Docker Compose uses a YAML file to supervision, to low-level storage and
Docker Engine also integrates the configure your application’s services. network attachments.
open source BuildKit component. Build- Once configured, you can use a single Designed to be embedded in a larger
Kit replaced and improved the legacy command to create and start all of your system such as Docker Engine, contain-
builder in the release of Docker Engine configuration’s services. erd functions as an internal runtime
23.0. BuildKit offers improvements in Docker Compose provides commands with minimal runtime requirements.
performance, storage management, and for an application’s entire life cycle. You The containerd daemon is available for
extensibility. Unlike the legacy builder, can use Docker Compose in all environ- both Linux and Windows, with most of
which performs builds serially from ments: development, testing, staging, its interactions with these operating
Dockerfiles (the text file containing all continuous integration (CI), and even systems’ container feature sets being
the commands called at the command production. Because Docker Compose is handled by runc or operating system-
line to assemble an image), BuildKit an abstraction that aligns with specific libraries.
Figure 3: You can easily build, run, and share containers from the Docker Desktop dashboard.
applies kernel updates and security offer a free Docker Personal subscrip- tools also support projects such as
patches. Docker Desktop combines tion [15], which is best suited to indi- Moby, CNCF, and OCI that encourage
Docker’s open source components into vidual developers, students and educa- a free, standards-based approach to
an easy-to-use GUI (Figure 3) that lets tors, noncommercial open source proj- container development. n n n
you access important development op- ects, and small businesses with fewer
tions with one click. In addition to than 250 employees and less than $10 Info
Docker’s open source components, million in revenue. [1] Docker Engine:
Docker Desktop includes useful tools Additionally, Docker Scout [16] is a https://docs.docker.com/engine/
such as Docker Extensions, which lets software supply chain product that pro-
[2] Docker Compose:
you connect the Docker environment to vides context-aware recommendations to
https://github.com/docker/compose
tools you are already using, plus access developers. The goal of these recommen-
[3] Docker Compose Watch: https://docs.
to Docker Hub for container images and dations is to help the developer build ap-
docker.com/compose/file‑watch/
templates, as well the ability to run a plications that are reliable and secure
single-node Kubernetes cluster. from the start. You can use Docker Scout [4] containerd: https://github.com/
Although Docker Desktop is a sub- in Docker Desktop, Docker Hub, and the containerd/containerd
scription-based offering, Docker does Docker Scout Dashboard. In the Docker [5] Distribution: https://github.com/
CLI, you can use the Docker Scout CLI distribution/distribution
DSOS Program Requirements plugin, which is available as a script or [6] DataKit:
can be installed manually as a binary. As https://github.com/moby/datakit
To qualify for the DSOS program, your
project must meet the following re-
of early October 2023, Docker Scout is in
[7] Notary: https://github.com/
quirements: general availability
notaryproject/notary
• S
hared in Docker Hub’s public reposi-
tories with the source code publicly
Conclusion [8] Docker Content Trust: https://docs.
Docker plays an important role in the docker.com/engine/security/trust/
accessible
open source container ecosystem. Many [9] runc: https://github.com/
• C
ompliant with the Open Source opencontainers/runc
core Docker components are open
Initiative definition of open source
source, and initiatives such as the DSOS [10] DSOS: https://www.docker.com/
software [12]
program help independent software de- community/open‑source/application/
• A
ctive on Docker Hub with updates
velopers make their projects available [11] Trusted Content:
pushed regularly in the past six
to the community. Docker developer https://docs.docker.com/
months or dependencies updated
trusted‑content/
regularly, even if your code is stable
This article was made possible by support [12] Open Source Initiative definition:
• N
o pathway to commercialization, https://opensource.org/osd/
from Docker through Linux New Media’s
which means you cannot profit
Topic Subsidy Program (https://www. [13] DSOS application:
through services or charge for higher
linuxnewmedia.com/Topic_Subsidy). https://www.docker.com/community/
tiers, although you can accept dona-
open‑source/application/
tions
Author [14] Docker Desktop: https://www.docker.
• Y
our Docker Hub repositories contain
Amy Pettle is an editor for ADMIN and com/products/docker‑desktop/
documentation that meets the recom-
Linux Magazine. She started out in tech [15] Docker Personal:
mended community standards
publishing with C/C++ Users Journal https://www.docker.com/pricing/
If you are interested in the DSOS pro-
over 20 years ago and has worked on [16] Docker Scout:
gram, submit an application online [13].
various Linux New Media publications. https://docs.docker.com/scout/
nnn