2 Tool for Building Images and Managing Containers #
This chapter provides a brief overview of tools for building images and managing containers. Most of the tools mentioned below are part of the SUSE Linux Enterprise Server 15 SP2 Containers Module . You can see the full list of packages in the Containers Module in the SUSE Customer Center .
2.1 Tools Available to Customers #
2.1.1 Docker #
Docker is a system for creating and managing containers. Its core is the Docker Open Source Engine—a lightweight virtualization solution to run containers simultaneously on a single host. Docker containers can be built using Dockerfiles (see Dockerfile). For a general introduction to Docker Open Source Engine, refer to Chapter 3, Docker Open Source Engine Overview.
2.1.2 Podman #
Podman stands for Pod Manager tool. It is a daemonless container engine for developing, managing, and running Open Container Initiative (OCI) containers on a Linux system, and it offers a drop-in alternative for Docker. Podman is the default container runtime in openSUSE Kubic—a certified Kubernetes distribution built on top of openSUSE. For a general introduction to Podman, refer to Chapter 10, Podman Overview.
2.1.3 Buildah #
Buildah facilitates building OCI container images. It is a complimentary
tool to Podman, and podman build
uses Buildah to
perform container image builds. Buildah makes it possible to build images
from scratch, from existing images, and using Dockerfiles. OCI images built
using the Buildah command-line tool and the underlying OCI-based
technologies (for example, containers/image
and
containers/storage
) are portable and can therefore run
in a Docker Open Source Engine environment.
For information on installing and using Buildah, refer to Chapter 11, Buildah Overview.
2.2 SUSE Build Tools #
2.2.1 Open Build Service #
The Open Build Service (OBS) provides free infrastructure for building and storing RPM packages including various container formats. The OBS Container Registry provides a detailed listing of all container images built by the OBS, complete with commands for pulling the images into your local Docker environment. The OBS openSUSE container image templates can be modified to specific needs, which offers the easiest way to create your own container branch. Container images can be built with native Docker tools from an existing image using a Dockerfile. Alternatively, images can be built from scratch using the KIWI image-building solution.
Instructions on how to build images on OBS can be found at https://openbuildservice.org/2018/05/09/container-building-and-distribution/ .
2.2.2 KIWI #
KIWI Next Generation is a multi-purpose tool for building images. In
addition to container images, regular installation ISO images, and images
for virtual machines, KIWI can build images that boot via PXE or Vagrant
boxes. The main building block in KIWI is an image XML description, a
directory that includes the config.xml
or
.kiwi
file along with scripts or configuration data.
The process of creating images with KIWI is fully automated and does not
require any user interaction. Any information required for the image
creation process is provided by the primary configuration file
config.xml
. The image can be customized using the
config.sh
and images.sh
scripts.
It is important to distinguish between KIWI NG (currently version 9.20.9) and its unmaintained legacy versions (7.x.x or older), now called KIWI Legacy .
For specific information on how to install KIWI and use it to build images, see the KIWI documentation . A collection of example image descriptions can be found on the KIWI GitHub repository .
KIWI's man pages provide information on using the tool. To access man pages, install the kiwi-man-pages package.
2.3 Building Official SLE Images #
Images are considered official only if they are built using the Internal Build Service.
There are no official SLE container images on https://build.opensuse.org , and the RPMs exported there are not identical to the internal ones. This means that it is not possible to build officially supported images on https://build.opensuse.org .