Containers
The following features, enhancements, and changes related to containers are introduced in this Oracle Linux 9 release.
Podman containers.conf
Modules
Podman can run with containers.conf
modules files to
load a predetermined set of configurations on-demand. When you specify a module file, you
override the system and user configuration files.
You can created these files in the following directories:
-
For rootless users, put the configuration file in the home directory of the user. For example,
$HOME/.config/containers/containers.conf.modules
-
For root users, put the configuration file in one of the following directories:
/etc/containers/containers.conf.modules /usr/share/containers/containers.conf.modules
podman --module <your_module_name>
In the previous command, -
--module
specifies a module. You can use this option multiple times if required. -
<your_module_name>
Is path to the module and the module name which is the name of the configuration file. The path can be an absolute path or a relative path. If the module path is absolute, then the module is loaded directly. If the module path is relative, then it resolves to the rootless or root user module directories mentioned previously. -
Modules contained in the
$HOME
directory override those in the/etc/
and/usr/share/
directories.
For more information, see man page for containers.conf
.
Container Tools Packages Are Updated
The updated Container Tools RPM meta-package, which contain the Podman, Buildah, Skopeo, crun, and runc tools, are now available. Notable bug fixes and enhancements over the previous version include:
Notable changes in Podman v4.9:
-
You can now use Podman to load the modules on-demand by using the
podman --module <your_module_name>
command and to override the system and user configuration files. For more information, see Podman containers.conf Modules. -
A new
podman farm
command with a set of thecreate
,set
,remove
, andupdate
subcommands has been added. With these commands, you can farm out builds to machines running podman for different architectures. -
A new
podman-compose
command has been added, which runs Compose workloads by using an external compose provider such as Docker compose. -
The
podman build
command now supports the--layer-label
and--cw
options. -
The
podman generate systemd
command is deprecated. Use Quadlet to run containers and pods undersystemd
. -
The
podman build
command now supportsContainerfiles
with the HereDoc syntax. For more information ,see Containerfile Multi-Line Instructions. -
The
podman kube play
command now supports a new--publish-all
option. Use this option to expose all containerPorts on the host.
For more information about notable changes, see https://github.com/containers/podman/blob/main/RELEASE_NOTES.md#470%22.
SQLite Now Default Podman Database
The SQLite database backend for Podman, which provides better stability, performance, and consistency when working with container metadata, is now fully supported.
containers.conf
file
by using the database_backend
option. Available values are:
- "" If an empty value is specified, the default value is
sqlite
. If you upgrade from a previous Oracle Linux version, and the empty value is specified, the default value isboltdb
if BoltDB was already on the previous version of the system. This enables backward compatibility. If BoltDB was not already on the previous version of Oracle Linux, thensqlite
is used. - "sqlite" The database backend for Podman uses SQLite.
- "boltdb" The database backend for Podman uses BoltDB
Run the podman system reset
command before switching to the SQLite database
backend.
Containerfile
Multi-Line Instructions
You can use the multi-line HereDoc instructions (Here Document notation) in the
Containerfile
file to simplify this file and reduce the number of
image layers caused by performing multiple RUN
directives.
For example, the original Containerfile
can contain the following
RUN
directives:
RUN dnf update
RUN dnf -y install golang
RUN dnf -y install java
Instead of multiple RUN directives, you can use the HereDoc notation:
RUN <<EOF
dnf update
dnf -y install golang
dnf -y install java
EOF
pasta
Networking Mode Is Available
The pasta
network mode, available beginning with Podman 4.4.1, is a
high-performance replacement of the default network mode slirp4netns
and can
handle IPv6 forwarding.
To use this network mode when the podman run
command is used, install
the passt
package as follows:
sudo dnf install passt --network=pasta
To set a rootless network mode as default, edit the
/etc/containers/containers.conf
file with the following entry:
[network] default_rootless_network_cmd