be3dc7
% containers.conf(5) Container engine configuration file
be3dc7
be3dc7
# NAME
be3dc7
containers.conf - The container engine configuration file specifies default
be3dc7
configuration options and command-line flags for container engines.
be3dc7
be3dc7
# DESCRIPTION
be3dc7
Container engines like Podman & Buildah read containers.conf file, if it exists
be3dc7
and modify the defaults for running containers on the host. containers.conf uses
be3dc7
a TOML format that can be easily modified and versioned.
be3dc7
be3dc7
Container engines read the /usr/share/containers/containers.conf and
be3dc7
/etc/containers/containers.conf files if they exists.  When running in rootless
be3dc7
mode, they also read $HOME/.config/containers/containers.conf files.
be3dc7
be3dc7
Fields specified in containers conf override the default options, as well as
be3dc7
options in previously read containers.conf files.
be3dc7
be3dc7
Not all options are supported in all container engines.
be3dc7
be3dc7
Note container engines also use other configuration files for configuring the environment.
be3dc7
be3dc7
* `storage.conf` for configuration of container and images storage.
be3dc7
* `registries.conf` for definition of container registires to search while pulling.
be3dc7
container images.
be3dc7
* `policy.conf` for controlling which images can be pulled to the system.
be3dc7
be3dc7
# FORMAT
be3dc7
The [TOML format][toml] is used as the encoding of the configuration file.
be3dc7
Every option is nested under its table. No bare options are used. The format of
be3dc7
TOML can be simplified to:
be3dc7
be3dc7
    [table1]
be3dc7
    option = value
be3dc7
be3dc7
    [table2]
be3dc7
    option = value
be3dc7
be3dc7
    [table3]
be3dc7
    option = value
be3dc7
be3dc7
    [table3.subtable1]
be3dc7
    option = value
be3dc7
be3dc7
## CONTAINERS TABLE
be3dc7
The containers table contains settings pertaining to the OCI runtime that can
be3dc7
configure and manage the OCI runtime.
be3dc7
be3dc7
**devices**=[]
be3dc7
be3dc7
List of devices.
be3dc7
Specified as 'device-on-host:device-on-container:permissions'.
be3dc7
be3dc7
Example: "/dev/sdc:/dev/xvdc:rwm".
be3dc7
be3dc7
**volumes**=[]
be3dc7
be3dc7
List of volumes.
be3dc7
Specified as "directory-on-host:directory-in-container:options".
be3dc7
be3dc7
Example:  "/db:/var/lib/db:ro".
be3dc7
be3dc7
**apparmor_profile**="container-default"
be3dc7
be3dc7
Used to change the name of the default AppArmor profile of container engines.
be3dc7
The default profile name is "container-default".
be3dc7
be3dc7
**cgroupns**="private"
be3dc7
be3dc7
Default way to to create a cgroup namespace for the container.
be3dc7
Options are:
be3dc7
`private` Create private Cgroup Namespace for the container.
be3dc7
`host`    Share host Cgroup Namespace with the container.
be3dc7
be3dc7
**cgroups**="enabled"
be3dc7
be3dc7
Determines  whether  the  container will create CGroups.
be3dc7
Options are:
be3dc7
  `enabled`   Enable cgroup support within container
be3dc7
  `disabled`  Disable cgroup support, will inherit cgroups from parent
be3dc7
  `no-conmon` Do not create a cgroup dedicated to conmon.
be3dc7
be3dc7
**default_capabilities**=[]
be3dc7
be3dc7
List of default capabilities for containers.
be3dc7
be3dc7
The default list is:
be3dc7
```
be3dc7
default_capabilities = [
be3dc7
"AUDIT_WRITE",
be3dc7
      "CHOWN",
be3dc7
      "DAC_OVERRIDE",
be3dc7
      "FOWNER",
be3dc7
      "FSETID",
be3dc7
      "KILL",
be3dc7
      "MKNOD",
be3dc7
      "NET_BIND_SERVICE",
be3dc7
      "NET_RAW",
be3dc7
      "SETGID",
be3dc7
      "SETPCAP",
be3dc7
      "SETUID",
be3dc7
      "SYS_CHROOT",
be3dc7
]
be3dc7
```
be3dc7
be3dc7
**default_sysctls**=[]
be3dc7
be3dc7
A list of sysctls to be set in containers by default,
be3dc7
specified as "name=value".
be3dc7
be3dc7
Example:"net.ipv4.ping_group_range=0 1000".
be3dc7
be3dc7
**default_ulimits**=[]
be3dc7
be3dc7
A list of ulimits to be set in containers by default,
be3dc7
specified as "name=soft-limit:hard-limit".
be3dc7
be3dc7
Example: "nofile=1024:2048".
be3dc7
be3dc7
**dns_options**=[]
be3dc7
be3dc7
List of default DNS options to be added to /etc/resolv.conf inside of the
be3dc7
container.
be3dc7
be3dc7
**dns_searches**=[]
be3dc7
be3dc7
List of default DNS search domains to be added to /etc/resolv.conf inside of
be3dc7
the container.
be3dc7
be3dc7
**dns_servers**=[]
be3dc7
be3dc7
A list of dns servers to override the DNS configuration passed to the
be3dc7
container. The special value “none” can be specified to disable creation of
be3dc7
/etc/resolv.conf in the container.
be3dc7
be3dc7
**env**=["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm"]
be3dc7
be3dc7
Environment variable list for the container process, used for passing
be3dc7
environment variables to the container.
be3dc7
be3dc7
**env_host**=false
be3dc7
be3dc7
Pass all host environment variables into the container.
be3dc7
be3dc7
**http_proxy**=true
be3dc7
be3dc7
Default proxy environment variables will be passed into the container.
be3dc7
The environment variables passed in include:
be3dc7
`http_proxy`, `https_proxy`, `ftp_proxy`, `no_proxy`, and the upper case
be3dc7
versions of these. The `no_proxy` option is needed when host system uses a proxy
be3dc7
but container should not use proxy. Proxy environment variables specified for
be3dc7
the container in any other way will override the values passed from the host.
be3dc7
be3dc7
**init**=false
be3dc7
be3dc7
Run an init inside the container that forwards signals and reaps processes.
be3dc7
be3dc7
**init_path**="/usr/libexec/podman/catatonit"
be3dc7
be3dc7
Path to the container-init binary, which forwards signals and reaps processes
be3dc7
within containers.  Note that the container-init binary will only be used when
be3dc7
the `--init` for podman-create and podman-run is set.
be3dc7
be3dc7
**ipcns**="private"
be3dc7
be3dc7
Default way to to create a IPC namespace for the container.
be3dc7
Options are:
be3dc7
  `private` Create private IPC Namespace for the container.
be3dc7
  `host`    Share host IPC Namespace with the container.
be3dc7
be3dc7
**keyring**=true
be3dc7
be3dc7
Indicates whether the container engines create a kernel keyring for use within
be3dc7
the container.
be3dc7
be3dc7
**label**=true
be3dc7
be3dc7
Indicates whether the container engine uses MAC(SELinux) container separation via labeling. This option is ignored on disabled systems.
be3dc7
be3dc7
**log_driver**="k8s-file"
be3dc7
be3dc7
Logging driver for the container. Available options: `k8s-file` and `journald`.
be3dc7
be3dc7
**log_size_max**=-1
be3dc7
be3dc7
Maximum size allowed for the container's log file. Negative numbers indicate
be3dc7
that no size limit is imposed. If it is positive, it must be >= 8192 to
be3dc7
match/exceed conmon's read buffer. The file is truncated and re-opened so the
be3dc7
limit is never exceeded.
be3dc7
be3dc7
**netns**="private"
be3dc7
be3dc7
Default way to to create a NET namespace for the container.
be3dc7
Options are:
be3dc7
  `private` Create private NET Namespace for the container.
be3dc7
  `host`    Share host NET Namespace with the container.
be3dc7
  `none`    Containers do not use the network.
be3dc7
be3dc7
**no_hosts**=false
be3dc7
be3dc7
Create /etc/hosts for the container.  By default, container engines manage
be3dc7
/etc/hosts, automatically adding  the container's  own  IP  address.
be3dc7
be3dc7
**pids_limit**=1024
be3dc7
be3dc7
Maximum number of processes allowed in a container. 0 indicates that no limit
be3dc7
is imposed.
be3dc7
be3dc7
**pidns**="private"
be3dc7
be3dc7
Default way to to create a PID namespace for the container.
be3dc7
Options are:
be3dc7
  `private` Create private PID Namespace for the container.
be3dc7
  `host`    Share host PID Namespace with the container.
be3dc7
be3dc7
**seccomp_profile**="/usr/share/containers/seccomp.json"
be3dc7
be3dc7
Path to the seccomp.json profile which is used as the default seccomp profile
be3dc7
for the runtime.
be3dc7
be3dc7
**shm_size**="65536k"
be3dc7
be3dc7
Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater
be3dc7
than `0`.
be3dc7
Unit is optional and can be:
be3dc7
`b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes).
be3dc7
If you omit the unit, the system uses bytes. If you omit the size entirely,
be3dc7
the system uses `65536k`.
be3dc7
be3dc7
**tz=**""
be3dc7
be3dc7
Set timezone in container. Takes IANA timezones as well as `local`, which sets the timezone in the container to match the host machine.
be3dc7
If not set, then containers will run with the time zone specified in the image.
be3dc7
be3dc7
Examples:
be3dc7
  `tz="local"`
be3dc7
  `tz="America/New_York"`
be3dc7
be3dc7
**umask**="0022"
be3dc7
be3dc7
Sets umask inside the container.
be3dc7
be3dc7
**utsns**="private"
be3dc7
be3dc7
Default way to to create a UTS namespace for the container.
be3dc7
Options are:
be3dc7
  `private` Create private UTS Namespace for the container.
be3dc7
  `host`    Share host UTS Namespace with the container.
be3dc7
be3dc7
**userns**="host"
be3dc7
be3dc7
Default way to to create a USER namespace for the container.
be3dc7
Options are:
be3dc7
  `private` Create private USER Namespace for the container.
be3dc7
  `host`    Share host USER Namespace with the container.
be3dc7
be3dc7
**userns_size**=65536
be3dc7
be3dc7
Number of UIDs to allocate for the automatic container creation. UIDs are
be3dc7
allocated from the “container” UIDs listed in /etc/subuid & /etc/subgid.
be3dc7
be3dc7
## NETWORK TABLE
be3dc7
The `network` table contains settings pertaining to the management of CNI
be3dc7
plugins.
be3dc7
be3dc7
**cni_plugin_dirs**=["/opt/cni/bin/",]
be3dc7
be3dc7
List of paths to directories where CNI plugin binaries are located.
be3dc7
be3dc7
**default_network**="podman"
be3dc7
be3dc7
The network name of the default CNI network to attach pods to.
be3dc7
be3dc7
**network_config_dir**="/etc/cni/net.d/"
be3dc7
be3dc7
Path to the directory where CNI configuration files are located.
be3dc7
be3dc7
## ENGINE TABLE
be3dc7
The `engine` table contains configuration options used to set up container engines such as Podman and Buildah.
be3dc7
be3dc7
**image_build_format**="oci"
be3dc7
The default image format to building container images. Valid values are "oci" (default) or "docker".
be3dc7
be3dc7
**cgroup_check**=false
be3dc7
be3dc7
CgroupCheck indicates the configuration has been rewritten after an upgrade to Fedora 31 to change the default OCI runtime for cgroupsv2.
be3dc7
be3dc7
**cgroup_manager**="systemd"
be3dc7
be3dc7
The cgroup management implementation used for the runtime. Supports `cgroupfs`
be3dc7
and `systemd`.
be3dc7
be3dc7
**conmon_env_vars**=[]
be3dc7
be3dc7
Environment variables to pass into Conmon.
be3dc7
be3dc7
**conmon_path**=[]
be3dc7
be3dc7
Paths to search for the conmon container manager binary. If the paths are
be3dc7
empty or no valid path was found, then the `$PATH` environment variable will be
be3dc7
used as the fallback.
be3dc7
be3dc7
The default list is:
be3dc7
```
be3dc7
conmon_path=[
be3dc7
    "/usr/libexec/podman/conmon",
be3dc7
    "/usr/local/libexec/podman/conmon",
be3dc7
    "/usr/local/lib/podman/conmon",
be3dc7
    "/usr/bin/conmon",
be3dc7
    "/usr/sbin/conmon",
be3dc7
    "/usr/local/bin/conmon",
be3dc7
    "/usr/local/sbin/conmon",
be3dc7
    "/run/current-system/sw/bin/conmon",
be3dc7
]
be3dc7
```
be3dc7
be3dc7
**detach_keys**="ctrl-p,ctrl-q"
be3dc7
be3dc7
Keys sequence used for detaching a container.
be3dc7
Specify the keys sequence used to detach a container.
be3dc7
Format is a single character `[a-Z]` or a comma separated sequence of
be3dc7
`ctrl-<value>`, where `<value>` is one of:
be3dc7
`a-z`, `@`, `^`, `[`, `\`, `]`, `^` or `_`
be3dc7
be3dc7
**enable_port_reservation**=true
be3dc7
be3dc7
Determines whether the engine will reserve ports on the host when they are
be3dc7
forwarded to containers. When enabled, when ports are forwarded to containers,
be3dc7
they are held open by conmon as long as the container is running, ensuring that
be3dc7
they cannot be reused by other programs on the host. However, this can cause
be3dc7
significant memory usage if a container has many ports forwarded to it.
be3dc7
Disabling this can save memory.
be3dc7
be3dc7
**env**=[]
be3dc7
be3dc7
Environment variables to be used when running the container engine (e.g., Podman, Buildah).  For example "http_proxy=internal.proxy.company.com".
be3dc7
Note these environment variables will not be used within the container. Set the env section under [containers] table,
be3dc7
if you want to set environment variables for the container.
be3dc7
be3dc7
**events_logger**="journald"
be3dc7
be3dc7
Default method to use when logging events.
be3dc7
Valid values: `file`, `journald`, and `none`.
be3dc7
be3dc7
**hooks_dir**=["/etc/containers/oci/hooks.d", ...]
be3dc7
be3dc7
Path to the OCI hooks directories for automatically executed hooks.
be3dc7
be3dc7
**image_default_transport**="docker://"
be3dc7
be3dc7
Default transport method for pulling and pushing images.
be3dc7
be3dc7
**infra_command**="/pause"
be3dc7
be3dc7
Command to run the infra container.
be3dc7
be3dc7
**infra_image**="k8s.gcr.io/pause:3.2"
be3dc7
be3dc7
Infra (pause) container image name for pod infra containers.  When running a
be3dc7
pod, we start a `pause` process in a container to hold open the namespaces
be3dc7
associated with the  pod.  This container does nothing other then sleep,
be3dc7
reserving the pods resources for the lifetime of the pod.
be3dc7
be3dc7
**lock_type**="shm"
be3dc7
be3dc7
Specify the locking mechanism to use; valid values are "shm" and "file".
be3dc7
Change the default only if you are sure of what you are doing, in general
be3dc7
"file" is useful only on platforms where cgo is not available for using the
be3dc7
faster "shm" lock type.  You may need to run "podman system renumber" after you
be3dc7
change the lock type.
be3dc7
be3dc7
**multi_image_archive**=false
be3dc7
be3dc7
Allows for creating archives (e.g., tarballs) with more than one image.  Some container engines, such as Podman, interpret additional arguments as tags for one image and hence do not store more than one image.  The default behavior can be altered with this option.
be3dc7
be3dc7
**namespace**=""
be3dc7
be3dc7
Default engine namespace. If the engine is joined to a namespace, it will see
be3dc7
only containers and pods that were created in the same namespace, and will
be3dc7
create new containers and pods in that namespace.  The default namespace is "",
be3dc7
which corresponds to no namespace. When no namespace is set, all containers
be3dc7
and pods are visible.
be3dc7
be3dc7
**network_cmd_path**=""
be3dc7
be3dc7
Path to the slirp4netns binary.
be3dc7
be3dc7
**network_cmd_options**=[]
be3dc7
be3dc7
Default options to pass to the slirp4netns binary.
be3dc7
be3dc7
Example "allow_host_loopback=true"
be3dc7
be3dc7
**no_pivot_root**=false
be3dc7
be3dc7
Whether to use chroot instead of pivot_root in the runtime.
be3dc7
be3dc7
**num_locks**=2048
be3dc7
be3dc7
Number of locks available for containers and pods. Each created container or
be3dc7
pod consumes one lock.  The default number available is 2048.  If this is
be3dc7
changed, a lock renumbering must be performed, using the
be3dc7
`podman system renumber` command.
be3dc7
be3dc7
**active_service**=""
be3dc7
be3dc7
Name of destination for accessing the Podman service.
be3dc7
be3dc7
**[service_destinations]**
be3dc7
be3dc7
**[service_destinations.{name}]**
be3dc7
be3dc7
**uri="ssh://user@production.example.com/run/user/1001/podman/podman.sock"**
be3dc7
be3dc7
  Example URIs:
be3dc7
be3dc7
- **rootless local**  - unix://run/user/1000/podman/podman.sock
be3dc7
- **rootless remote** - ssh://user@engineering.lab.company.com/run/user/1000/podman/podman.sock
be3dc7
- **rootfull local**  - unix://run/podman/podman.sock
be3dc7
- **rootfull remote** - ssh://root@10.10.1.136:22/run/podman/podman.sock
be3dc7
be3dc7
**identity="~/.ssh/id_rsa**
be3dc7
be3dc7
Path to file containing ssh identity key
be3dc7
be3dc7
**pull_policy**="always"|"missing"|"never"
be3dc7
be3dc7
Pull image before running or creating a container. The default is **missing**.
be3dc7
be3dc7
- **missing**: attempt to pull the latest image from the registries listed in registries.conf if a local image does not exist. Raise an error if the image is not in any listed registry and is not present locally.
be3dc7
- **always**: pull the image from the first registry it is found in as listed in registries.conf. Raise an error if not found in the registries, even if the image is present locally.
be3dc7
- **never**: do not pull the image from the registry, use only the local version. Raise an error if the image is not present locally.
be3dc7
be3dc7
**remote** = false
be3dc7
Indicates whether the application should be running in remote mode. This flag modifies the
be3dc7
--remote option on container engines. Setting the flag to true will default `podman --remote=true` for access to the remote Podman service.
be3dc7
be3dc7
**runtime**=""
be3dc7
be3dc7
Default OCI specific runtime in runtimes that will be used by default. Must
be3dc7
refer to a member of the runtimes table. Default runtime will be searched for
be3dc7
on the system using the priority: "crun", "runc", "kata".
be3dc7
be3dc7
**runtime_supports_json**=["crun", "runc", "kata"]
be3dc7
be3dc7
The list of the OCI runtimes that support `--format=json`.
be3dc7
be3dc7
**runtime_supports_nocgroups**=["crun"]
be3dc7
be3dc7
The list of OCI runtimes that support running containers without CGroups.
be3dc7
be3dc7
**runtime_supports_kvm**=["kata"]
be3dc7
be3dc7
The list of OCI runtimes that support running containers with KVM separation.
be3dc7
be3dc7
**static_dir**="/var/lib/containers/storage/libpod"
be3dc7
be3dc7
Directory for persistent libpod files (database, etc).
be3dc7
By default this will be configured relative to where containers/storage
be3dc7
stores containers.
be3dc7
be3dc7
**stop_timeout**=10
be3dc7
be3dc7
Number of seconds to wait for container to exit before sending kill signal.
be3dc7
be3dc7
**tmp_dir**="/run/libpod"
be3dc7
be3dc7
The path to a temporary directory to store per-boot container.
be3dc7
Must be a tmpfs (wiped after reboot).
be3dc7
be3dc7
**volume_path**="/var/lib/containers/storage/volumes"
be3dc7
be3dc7
Directory where named volumes will be created in using the default volume
be3dc7
driver.
be3dc7
By default this will be configured relative to where containers/storage store
be3dc7
containers. This convention is followed by the default volume driver, but may
be3dc7
not be by other drivers.
be3dc7
be3dc7
**[engine.volume_plugins]**
be3dc7
be3dc7
A table of all the enabled volume plugins on the system. Volume plugins can be
be3dc7
used as the backend for Podman named volumes. Individual plugins are specified
be3dc7
below, as a map of the plugin name (what the plugin will be called) to its path
be3dc7
(filepath of the plugin's unix socket).
be3dc7
be3dc7
# FILES
be3dc7
be3dc7
**containers.conf**
be3dc7
be3dc7
Distributions often provide a `/usr/share/containers/containers.conf` file to
be3dc7
define default container configuration. Administrators can override fields in
be3dc7
this file by creating `/etc/containers/containers.conf` to specify their own
be3dc7
configuration. Rootless users can further override fields in the config by
be3dc7
creating a config file stored in the
be3dc7
`$HOME/.config/containers/containers.conf` file.
be3dc7
be3dc7
If the `CONTAINERS_CONF` path environment variable is set, just
be3dc7
this path will be used.  This is primarily used for testing.
be3dc7
be3dc7
Fields specified in the containers.conf file override the default options, as
be3dc7
well as options in previously read containers.conf files.
be3dc7
be3dc7
**storage.conf**
be3dc7
be3dc7
The `/etc/containers/storage.conf` file is the default storage configuration file.
be3dc7
Rootless users can override fields in the storage config by creating
be3dc7
`$HOME/.config/containers/storage.conf`.
be3dc7
be3dc7
If the `CONTAINERS_STORAGE_CONF` path environment variable is set, this path
be3dc7
is used for the storage.conf file rather than the default.
be3dc7
This is primarily used for testing.
be3dc7
be3dc7
# SEE ALSO
be3dc7
containers-storage.conf(5), containers-policy.json(5), containers-registries.conf(5)
be3dc7
be3dc7
[toml]: https://github.com/toml-lang/toml