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