You are on page 1of 5

Stock Watcher

f r VCdI
SP
+
Build a custom app to

dE
e e AL
monitor your portfolio

ISSuE 277 – DECEmBER 2023

Low-Code Tools
Save money by keeping
it simple

defending WordPress: GitHub codespaces:


Stay ahead of intruders coding in the cloud
create a Smart Home collage Tools: Showcase
info center your pics with fotowall
and Photocollage
dnS over TLS: Keep your
lookups under wraps
Terrific

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

Open source container 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

2 DECEMBER 2023 ISSUE 277 LINUX-MAGAZINE.COM


IN-DEPTH
Docker Open Source Developer Tools

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 1: Docker’s client-server architecture.

LINUX-MAGAZINE.COM ISSUE 277 DECEMBER 2023 3


IN-DEPTH
Docker Open Source Developer Tools

container images using Docker-Sponsored Open Source


the OCI Distribution (DSOS) [10] for developers working on
Specification, which de- open source projects that don’t have a
fines an API protocol to path to commercialization. Started in
facilitate and standard- 2020, DSOS is the successor to the Free
ize content distribution. Team subscription offered prior to
Figure 2: A badge appears alongside images Docker Hub, GitHub 2021. Over 900 projects are currently
that are published by DSOS projects. Container Registry, and part of the DSOS program.
GitLab Container Regis- Being a DSOS member means your
By design, containerd works with try all use this open source code as the projects receive a special badge (Fig-
Docker and Kubernetes, as well as any basis for their container registries. ure 2) in Docker Hub, Docker’s container
container platform that wants to abstract • DataKit [6]: Developed upstream in image registry that lets open source con-
syscalls or operating system-specific the Moby Project, this tool orches- tributors find, share, and use container
functionality. Whereas containerd imple- trates apps using a Git-like data flow. images. The badge signifies that your
ments the Kubernetes Container Run- It is used as the coordination layer for project has been verified and vetted by
time Interface (CRI) for those wanting HyperKit, another Moby tool that Docker and is part of Docker’s Trusted
to run a Kubernetes cluster, you can functions as the hypervisor compo- Content [11]. In addition, DSOS projects
just as easily use containerd without nent of Docker for macOS and Win- receive free automatic builds on Docker
Kubernetes. However, if you do plan to dows, as well as for the DataKitCLI Hub. Program members and users who
use Kubernetes, you will want to use continuous integration system. pull images from your project
containerd v1.5.11 or v1.6.4 to address • Notary [7]: Donated to the CNCF by namespace also will get unlimited pulls
the recent removal of dockershim from Docker, this client and server runs and and egress, and DSOS members also re-
Kubernetes. interacts with trusted collections. It al- ceive a freeDocker Team subscription,
You can find containerd as a binary lows users and publishers to easily which includes Docker Desktop. By the
package for the 64-bit architectures verify content, making the Internet end of 2023, DSOS projects will also re-
Intel AMD, PowerPC Little Endian, and more secure. Notary is used in Docker ceive Docker Scout Team as part of their
RISC-V, as well as for the S390x Content Trust [8], which relies on digi- participation in the program.
architecture. tal signatures for sending and receiv- To find out if your project qualifies
ing data from remote Docker for DSOS, see the “DSOS Requirements”
Other Open Source Tools registries. box.
As an active member of the container • runc [9]: This CLI tool spawns and
open source community, Docker collabo- runs tools on Linux in accordance Docker Commercial Tools
rates on other projects and tools. Some with the OCI specification. This light- If you are looking for an easy way to get
of these projects include: weight portable container runtime can started with Docker, you might be inter-
• Distribution [5] (formerly Docker Dis- be used in production. ested in Docker Desktop [14], Docker’s
tribution): This toolkit, which Docker out-of-the-box containerization soft-
donated to the CNCF, lets you pack, Docker-Sponsored Open ware. Docker Desktop’s simple interface
ship, and deliver content. It contains Source Program doesn’t require you to run Docker from
the Open Source Registry implementa- In addition to contributing open source the command line. In addition, it han-
tion for storing and distributing tools, Docker offers a special program, dles container setup and automatically

Figure 3: You can easily build, run, and share containers from the Docker Desktop dashboard.

4 DECEMBER 2023 ISSUE 277 LINUX-MAGAZINE.COM


IN-DEPTH
Docker Open Source Developer Tools

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

LINUX-MAGAZINE.COM ISSUE 277 DECEMBER 2023 5

You might also like