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