github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-create.1.md (about)

     1  % podman-create(1)
     2  
     3  ## NAME
     4  podman\-create - Create a new container
     5  
     6  ## SYNOPSIS
     7  **podman create** [*options*] *image* [*command* [*arg* ...]]
     8  
     9  **podman container create** [*options*] *image* [*command* [*arg* ...]]
    10  
    11  ## DESCRIPTION
    12  
    13  Creates a writable container layer over the specified image and prepares it for
    14  running the specified command. The container ID is then printed to STDOUT. This
    15  is similar to **podman run -d** except the container is never started. You can
    16  then use the **podman start** *container* command to start the container at
    17  any point.
    18  
    19  The initial status of the container created with **podman create** is 'created'.
    20  
    21  Default settings for flags are defined in `containers.conf`. Most settings for
    22  remote connections use the server's containers.conf, except when documented in
    23  man pages.
    24  
    25  ## IMAGE
    26  
    27    The image is specified using transport:path format. If no transport is specified, the `docker` (container registry)
    28  transport will be used by default. For remote Podman, including Mac and Windows (excluding WSL2) machines, `docker` is the only allowed transport.
    29  
    30    **dir:**_path_
    31    An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files. This
    32  is a non-standardized format, primarily useful for debugging or noninvasive container inspection.
    33  
    34      $ podman save --format docker-dir fedora -o /tmp/fedora
    35      $ podman create dir:/tmp/fedora echo hello
    36  
    37    **docker://**_docker-reference_ (Default)
    38    An image reference stored in  a remote container image registry. Example: "quay.io/podman/stable:latest".
    39  The reference can include a path to a specific registry; if it does not, the
    40  registries listed in registries.conf will be queried to find a matching image.
    41  By default, credentials from `podman login` (stored at
    42  $XDG_RUNTIME_DIR/containers/auth.json by default) will be used to authenticate;
    43  otherwise it falls back to using credentials in $HOME/.docker/config.json.
    44  
    45      $ podman create registry.fedoraproject.org/fedora:latest echo hello
    46  
    47    **docker-archive:**_path_[**:**_docker-reference_]
    48  An image stored in the `docker save` formatted file. _docker-reference_ is only used when creating such a
    49  file, and it must not contain a digest.
    50  
    51      $ podman save --format docker-archive fedora -o /tmp/fedora
    52      $ podman create docker-archive:/tmp/fedora echo hello
    53  
    54    **docker-daemon:**_docker-reference_
    55    An image in _docker-reference_ format stored in the docker daemon internal storage. The _docker-reference_ can also be an image ID (docker-daemon:algo:digest).
    56  
    57      $ sudo docker pull fedora
    58      $ sudo podman create docker-daemon:docker.io/library/fedora echo hello
    59  
    60    **oci-archive:**_path_**:**_tag_
    61    An image in a directory compliant with the "Open Container Image Layout Specification" at the specified _path_
    62  and specified with a _tag_.
    63  
    64      $ podman save --format oci-archive fedora -o /tmp/fedora
    65      $ podman create oci-archive:/tmp/fedora echo hello
    66  
    67  ## OPTIONS
    68  
    69  #### **--add-host**=*host*
    70  
    71  Add a custom host-to-IP mapping (host:ip)
    72  
    73  Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
    74  option can be set multiple times.
    75  
    76  #### **--annotation**=*key=value*
    77  
    78  Add an annotation to the container. The format is key=value.
    79  The **--annotation** option can be set multiple times.
    80  
    81  #### **--arch**=*ARCH*
    82  Override the architecture, defaults to hosts, of the image to be pulled. For example, `arm`.
    83  
    84  #### **--attach**, **-a**=*location*
    85  
    86  Attach to STDIN, STDOUT or STDERR.
    87  
    88  In foreground mode (the default when **-d**
    89  is not specified), **podman run** can start the process in the container
    90  and attach the console to the process's standard input, output, and standard
    91  error. It can even pretend to be a TTY (this is what most command line
    92  executables expect) and pass along signals. The **-a** option can be set for
    93  each of stdin, stdout, and stderr.
    94  
    95  #### **--authfile**=*path*
    96  
    97  Path of the authentication file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json
    98  
    99  Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE
   100  environment variable. `export REGISTRY_AUTH_FILE=path`
   101  
   102  #### **--blkio-weight**=*weight*
   103  
   104  Block IO weight (relative weight) accepts a weight value between 10 and 1000.
   105  
   106  #### **--blkio-weight-device**=*weight*
   107  
   108  Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`).
   109  
   110  #### **--cap-add**=*capability*
   111  
   112  Add Linux capabilities
   113  
   114  #### **--cap-drop**=*capability*
   115  
   116  Drop Linux capabilities
   117  
   118  #### **--cgroup-conf**=*KEY=VALUE*
   119  
   120  When running on cgroup v2, specify the cgroup file to write to and its value. For example **--cgroup-conf=memory.high=1073741824** sets the memory.high limit to 1GB.
   121  
   122  #### **--cgroup-parent**=*path*
   123  
   124  Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
   125  
   126  #### **--cgroupns**=*mode*
   127  
   128  Set the cgroup namespace mode for the container.
   129      **`host`**: use the host's cgroup namespace inside the container.
   130      **`container:<NAME|ID>`**: join the namespace of the specified container.
   131      **`ns:<PATH>`**: join the namespace at the specified path.
   132      **`private`**: create a new cgroup namespace.
   133  
   134  If the host uses cgroups v1, the default is set to **host**. On cgroups v2 the default is **private**.
   135  
   136  #### **--cgroups**=*mode*
   137  
   138  Determines whether the container will create CGroups.
   139  Valid values are *enabled*, *disabled*, *no-conmon*, *split*, with the default being *enabled*.
   140  
   141  The *enabled* option will create a new cgroup under the cgroup-parent.
   142  The *disabled* option will force the container to not create CGroups, and thus conflicts with CGroup options (**--cgroupns** and **--cgroup-parent**).
   143  The *no-conmon* option disables a new CGroup only for the conmon process.
   144  The *split* option splits the current cgroup in two sub-cgroups: one for conmon and one for the container payload. It is not possible to set *--cgroup-parent* with *split*.
   145  
   146  #### **--chrootdirs**=*path*
   147  
   148  Path to a directory inside the container that should be treated as a `chroot` directory.
   149  Any Podman managed file (e.g., /etc/resolv.conf, /etc/hosts, etc/hostname) that is mounted into the root directory will be mounted into that location as well.
   150  Multiple directories should be separated with a comma.
   151  
   152  #### **--cidfile**=*id*
   153  
   154  Write the container ID to the file
   155  
   156  #### **--conmon-pidfile**=*path*
   157  
   158  Write the pid of the `conmon` process to a file. `conmon` runs in a separate process than Podman, so this is necessary when using systemd to restart Podman containers.
   159  (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
   160  
   161  #### **--cpu-period**=*limit*
   162  
   163  Set the CPU period for the Completely Fair Scheduler (CFS), which is a
   164  duration in microseconds. Once the container's CPU quota is used up, it will
   165  not be scheduled to run until the current period ends. Defaults to 100000
   166  microseconds.
   167  
   168  On some systems, changing the CPU limits may not be allowed for non-root
   169  users. For more details, see
   170  https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
   171  
   172  #### **--cpu-quota**=*limit*
   173  
   174  Limit the CPU Completely Fair Scheduler (CFS) quota.
   175  
   176  Limit the container's CPU usage. By default, containers run with the full
   177  CPU resource. The limit is a number in microseconds. If you provide a number,
   178  the container will be allowed to use that much CPU time until the CPU period
   179  ends (controllable via **--cpu-period**).
   180  
   181  On some systems, changing the CPU limits may not be allowed for non-root
   182  users. For more details, see
   183  https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
   184  
   185  #### **--cpu-rt-period**=*microseconds*
   186  
   187  Limit the CPU real-time period in microseconds
   188  
   189  Limit the container's Real Time CPU usage. This flag tell the kernel to restrict the container's Real Time CPU usage to the period you specify.
   190  
   191  This flag is not supported on cgroups V2 systems.
   192  
   193  #### **--cpu-rt-runtime**=*microseconds*
   194  
   195  Limit the CPU real-time runtime in microseconds
   196  
   197  Limit the containers Real Time CPU usage. This flag tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex:
   198  Period of 1,000,000us and Runtime of 950,000us means that this container could consume 95% of available CPU and leave the remaining 5% to normal priority tasks.
   199  
   200  The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
   201  
   202  This flag is not supported on cgroups V2 systems.
   203  
   204  #### **--cpu-shares**=*shares*
   205  
   206  CPU shares (relative weight)
   207  
   208  By default, all containers get the same proportion of CPU cycles. This proportion
   209  can be modified by changing the container's CPU share weighting relative
   210  to the weighting of all other running containers.
   211  
   212  To modify the proportion from the default of 1024, use the **--cpu-shares**
   213  flag to set the weighting to 2 or higher.
   214  
   215  The proportion will only apply when CPU-intensive processes are running.
   216  When tasks in one container are idle, other containers can use the
   217  left-over CPU time. The actual amount of CPU time will vary depending on
   218  the number of containers running on the system.
   219  
   220  For example, consider three containers, one has a cpu-share of 1024 and
   221  two others have a cpu-share setting of 512. When processes in all three
   222  containers attempt to use 100% of CPU, the first container would receive
   223  50% of the total CPU time. If you add a fourth container with a cpu-share
   224  of 1024, the first container only gets 33% of the CPU. The remaining containers
   225  receive 16.5%, 16.5% and 33% of the CPU.
   226  
   227  On a multi-core system, the shares of CPU time are distributed over all CPU
   228  cores. Even if a container is limited to less than 100% of CPU time, it can
   229  use 100% of each individual CPU core.
   230  
   231  For example, consider a system with more than three cores. If you start one
   232  container **{C0}** with **-c=512** running one process, and another container
   233  **{C1}** with **-c=1024** running two processes, this can result in the following
   234  division of CPU shares:
   235  
   236  PID    container	CPU	CPU share
   237  100    {C0}		0	100% of CPU0
   238  101    {C1}		1	100% of CPU1
   239  102    {C1}		2	100% of CPU2
   240  
   241  #### **--cpus**=*number*
   242  
   243  Number of CPUs. The default is *0.0* which means no limit. This is shorthand
   244  for **--cpu-period** and **--cpu-quota**, so you may only set either
   245  #### **--cpus** or **--cpu-period** and **--cpu-quota**.
   246  
   247  On some systems, changing the CPU limits may not be allowed for non-root
   248  users. For more details, see
   249  https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
   250  
   251  #### **--cpuset-cpus**=*cpus*
   252  
   253  CPUs in which to allow execution (0-3, 0,1)
   254  
   255  #### **--cpuset-mems**=*nodes*
   256  
   257  Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
   258  
   259  If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1`
   260  then processes in your container will only use memory from the first
   261  two memory nodes.
   262  
   263  #### **--device**=_host-device_[**:**_container-device_][**:**_permissions_]
   264  
   265  Add a host device to the container. Optional *permissions* parameter
   266  can be used to specify device permissions, it is combination of
   267  **r** for read, **w** for write, and **m** for **mknod**(2).
   268  
   269  Example: **--device=/dev/sdc:/dev/xvdc:rwm**.
   270  
   271  Note: if _host_device_ is a symbolic link then it will be resolved first.
   272  The container will only store the major and minor numbers of the host device.
   273  
   274  Note: if the user only has access rights via a group, accessing the device
   275  from inside a rootless container will fail. Use the `--group-add keep-groups`
   276  flag to pass the user's supplementary group access into the container.
   277  
   278  Podman may load kernel modules required for using the specified
   279  device. The devices that podman will load modules when necessary are:
   280  /dev/fuse.
   281  
   282  #### **--device-cgroup-rule**="type major:minor mode"
   283  
   284  Add a rule to the cgroup allowed devices list. The rule is expected to be in the format specified in the Linux kernel documentation (Documentation/cgroup-v1/devices.txt):
   285         - type: a (all), c (char), or b (block);
   286         - major and minor: either a number, or * for all;
   287         - mode: a composition of r (read), w (write), and m (mknod(2)).
   288  
   289  #### **--device-read-bps**=*path*
   290  
   291  Limit read rate (bytes per second) from a device (e.g. --device-read-bps=/dev/sda:1mb)
   292  
   293  #### **--device-read-iops**=*path*
   294  
   295  Limit read rate (IO per second) from a device (e.g. --device-read-iops=/dev/sda:1000)
   296  
   297  #### **--device-write-bps**=*path*
   298  
   299  Limit write rate (bytes per second) to a device (e.g. --device-write-bps=/dev/sda:1mb)
   300  
   301  #### **--device-write-iops**=*path*
   302  
   303  Limit write rate (IO per second) to a device (e.g. --device-write-iops=/dev/sda:1000)
   304  
   305  #### **--disable-content-trust**
   306  
   307  This is a Docker specific option to disable image verification to a Docker
   308  registry and is not supported by Podman. This flag is a NOOP and provided
   309  solely for scripting compatibility.
   310  
   311  #### **--dns**=*dns*
   312  
   313  Set custom DNS servers. Invalid if using **--dns** and **--network** that is set to 'none' or `container:<name|id>`.
   314  
   315  This option can be used to override the DNS
   316  configuration passed to the container. Typically this is necessary when the
   317  host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this
   318  is the case the **--dns** flag is necessary for every run.
   319  
   320  The special value **none** can be specified to disable creation of **/etc/resolv.conf** in the container by Podman.
   321  The **/etc/resolv.conf** file in the image will be used without changes.
   322  
   323  #### **--dns-opt**=*option*
   324  
   325  Set custom DNS options. Invalid if using **--dns-opt** and **--network** that is set to 'none' or `container:<name|id>`.
   326  
   327  #### **--dns-search**=*domain*
   328  
   329  Set custom DNS search domains. Invalid if using **--dns-search** and **--network** that is set to 'none' or `container:<name|id>`. (Use --dns-search=. if you don't wish to set the search domain)
   330  
   331  #### **--entrypoint**=*"command"* | *'["command", "arg1", ...]'*
   332  
   333  Overwrite the default ENTRYPOINT of the image
   334  
   335  This option allows you to overwrite the default entrypoint of the image.
   336  The ENTRYPOINT of an image is similar to a COMMAND
   337  because it specifies what executable to run when the container starts, but it is
   338  (purposely) more difficult to override. The ENTRYPOINT gives a container its
   339  default nature or behavior, so that when you set an ENTRYPOINT you can run the
   340  container as if it were that binary, complete with default options, and you can
   341  pass in more options via the COMMAND. But, sometimes an operator may want to run
   342  something else inside the container, so you can override the default ENTRYPOINT
   343  at runtime by using a **--entrypoint** and a string to specify the new
   344  ENTRYPOINT.
   345  
   346  You need to specify multi option commands in the form of a json string.
   347  
   348  #### **--env**, **-e**=*env*
   349  
   350  Set environment variables
   351  
   352  This option allows arbitrary environment variables that are available for the process to be launched inside of the container. If an environment variable is specified without a value, Podman will check the host environment for a value and set the variable only if it is set on the host. If an environment variable ending in __*__ is specified, Podman will search the host environment for variables starting with the prefix and will add those variables to the container. If an environment variable with a trailing ***** is specified, then a value must be supplied.
   353  
   354  See [**Environment**](#environment) note below for precedence and examples.
   355  
   356  #### **--env-file**=*file*
   357  
   358  Read in a line delimited file of environment variables. See **Environment** note below for precedence.
   359  
   360  #### **--env-host**
   361  
   362  Use host environment inside of the container. See **Environment** note below for precedence. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
   363  
   364  #### **--expose**=*port*
   365  
   366  Expose a port, or a range of ports (e.g. --expose=3300-3310) to set up port redirection
   367  on the host system.
   368  
   369  #### **--gidmap**=*container_gid:host_gid:amount*
   370  
   371  GID map for the user namespace. Using this flag will run the container with user namespace enabled. It conflicts with the `--userns` and `--subgidname` flags.
   372  
   373  The following example maps uids 0-2000 in the container to the uids 30000-31999 on the host and gids 0-2000 in the container to the gids 30000-31999 on the host. `--gidmap=0:30000:2000`
   374  
   375  Note: the **--gidmap** flag cannot be called in conjunction with the **--pod** flag as a gidmap cannot be set on the container level when in a pod.
   376  
   377  #### **--group-add**=*group|keep-groups*
   378  
   379  Assign additional groups to the primary user running within the container process.
   380  
   381  - `keep-groups` is a special flag that tells Podman to keep the supplementary group access.
   382  
   383  Allows container to use the user's supplementary group access. If file systems or
   384  devices are only accessible by the rootless user's group, this flag tells the OCI
   385  runtime to pass the group access into the container. Currently only available
   386  with the `crun` OCI runtime. Note: `keep-groups` is exclusive, you cannot add any other groups
   387  with this flag. (Not available for remote commands, including Mac and Windows (excluding WSL2) machines)
   388  
   389  #### **--health-cmd**=*"command"* | *'["command", "arg1", ...]'*
   390  
   391  Set or alter a healthcheck command for a container. The command is a command to be executed inside your
   392  container that determines your container health. The command is required for other healthcheck options
   393  to be applied. A value of `none` disables existing healthchecks.
   394  
   395  Multiple options can be passed in the form of a JSON array; otherwise, the command will be interpreted
   396  as an argument to `/bin/sh -c`.
   397  
   398  #### **--health-interval**=*interval*
   399  
   400  Set an interval for the healthchecks (a value of `disable` results in no automatic timer setup) (default "30s")
   401  
   402  #### **--health-retries**=*retries*
   403  
   404  The number of retries allowed before a healthcheck is considered to be unhealthy. The default value is `3`.
   405  
   406  #### **--health-start-period**=*period*
   407  
   408  The initialization time needed for a container to bootstrap. The value can be expressed in time format like
   409  `2m3s`. The default value is `0s`
   410  
   411  #### **--health-timeout**=*timeout*
   412  
   413  The maximum time allowed to complete the healthcheck before an interval is considered failed. Like start-period, the
   414  value can be expressed in a time format such as `1m22s`. The default value is `30s`.
   415  
   416  #### **--help**
   417  
   418  Print usage statement
   419  
   420  #### **--hostname**=*name*, **-h**
   421  
   422  Container host name
   423  
   424  Sets the container host name that is available inside the container. Can only be used with a private UTS namespace `--uts=private` (default). If `--pod` is specified and the pod shares the UTS namespace (default) the pod's hostname will be used.
   425  
   426  #### **--hostuser**=*name*
   427  
   428  Add a user account to /etc/passwd from the host to the container. The Username
   429  or UID must exist on the host system.
   430  
   431  #### **--http-proxy**
   432  
   433  By default proxy environment variables are passed into the container if set
   434  for the Podman process. This can be disabled by setting the `--http-proxy`
   435  option to `false`. The environment variables passed in include `http_proxy`,
   436  `https_proxy`, `ftp_proxy`, `no_proxy`, and also the upper case versions of
   437  those. This option is only needed when the host system must use a proxy but
   438  the container should not use any proxy. Proxy environment variables specified
   439  for the container in any other way will override the values that would have
   440  been passed through from the host. (Other ways to specify the proxy for the
   441  container include passing the values with the `--env` flag, or hard coding the
   442  proxy environment at container build time.)  (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
   443  
   444  For example, to disable passing these environment variables from host to
   445  container:
   446  
   447  `--http-proxy=false`
   448  
   449  Defaults to `true`
   450  
   451  #### **--image-volume**, **builtin-volume**=*bind|tmpfs|ignore*
   452  
   453  Tells Podman how to handle the builtin image volumes. Default is **bind**.
   454  
   455  - **bind**: An anonymous named volume will be created and mounted into the container.
   456  - **tmpfs**: The volume is mounted onto the container as a tmpfs, which allows the users to create
   457  content that disappears when the container is stopped.
   458  - **ignore**: All volumes are just ignored and no action is taken.
   459  
   460  #### **--init**
   461  
   462  Run an init inside the container that forwards signals and reaps processes.
   463  The container-init binary is mounted at `/run/podman-init`.
   464  Mounting over `/run` will hence break container execution.
   465  
   466  #### **--init-ctr**=*type* (pods only)
   467  
   468  When using pods, create an init style container, which is run after the infra container is started
   469  but before regular pod containers are started.  Init containers are useful for running
   470  setup operations for the pod's applications.
   471  
   472  Valid values for `init-ctr` type are *always* or *once*.  The *always* value
   473  means the container will run with each and every `pod start`, whereas the *once*
   474  value means the container will only run once when the pod is started and then the container is removed.
   475  
   476  Init containers are only run on pod `start`.  Restarting a pod will not execute any init
   477  containers should they be present.  Furthermore, init containers can only be created in a
   478  pod when that pod is not running.
   479  
   480  #### **--init-path**=*path*
   481  
   482  Path to the container-init binary.
   483  
   484  #### **--interactive**, **-i**
   485  
   486  Keep STDIN open even if not attached. The default is *false*.
   487  
   488  #### **--ip**=*ipv4*
   489  
   490  Specify a static IPv4 address for the container, for example **10.88.64.128**.
   491  This option can only be used if the container is joined to only a single network - i.e., **--network=network-name** is used at most once -
   492  and if the container is not joining another container's network namespace via **--network=container:_id_**.
   493  The address must be within the network's IP address pool (default **10.88.0.0/16**).
   494  
   495  To specify multiple static IP addresses per container, set multiple networks using the **--network** option with a static IP address specified for each using the `ip` mode for that option.
   496  
   497  #### **--ip6**=*ipv6*
   498  
   499  Specify a static IPv6 address for the container, for example **fd46:db93:aa76:ac37::10**.
   500  This option can only be used if the container is joined to only a single network - i.e., **--network=network-name** is used at most once -
   501  and if the container is not joining another container's network namespace via **--network=container:_id_**.
   502  The address must be within the network's IPv6 address pool.
   503  
   504  To specify multiple static IPv6 addresses per container, set multiple networks using the **--network** option with a static IPv6 address specified for each using the `ip6` mode for that option.
   505  
   506  
   507  #### **--ipc**=*ipc*
   508  
   509  Set the IPC namespace mode for a container. The default is to create
   510  a private IPC namespace.
   511  
   512  - "": Use Podman's default, defined in containers.conf.
   513  - **container:**_id_: reuses another container's shared memory, semaphores, and message queues
   514  - **host**: use the host's shared memory, semaphores, and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
   515  - **none**:  private IPC namespace, with /dev/shm not mounted.
   516  - **ns:**_path_: path to an IPC namespace to join.
   517  - **private**: private IPC namespace.
   518  = **shareable**: private IPC namespace with a possibility to share it with other containers.
   519  
   520  #### **--label**, **-l**=*label*
   521  
   522  Add metadata to a container (e.g., --label com.example.key=value)
   523  
   524  #### **--label-file**=*file*
   525  
   526  Read in a line delimited file of labels
   527  
   528  #### **--link-local-ip**=*ip*
   529  
   530  Not implemented
   531  
   532  #### **--log-driver**="*k8s-file*"
   533  
   534  Logging driver for the container. Currently available options are *k8s-file*, *journald*, *none* and *passthrough*, with *json-file* aliased to *k8s-file* for scripting compatibility.
   535  
   536  The podman info command below will display the default log-driver for the system.
   537  ```
   538  $ podman info --format '{{ .Host.LogDriver }}'
   539  journald
   540  ```
   541  The *passthrough* driver passes down the standard streams (stdin, stdout, stderr) to the
   542  container.  It is not allowed with the remote Podman client, including Mac and Windows (excluding WSL2) machines, and on a tty, since it is
   543  vulnerable to attacks via TIOCSTI.
   544  
   545  #### **--log-opt**=*name*=*value*
   546  
   547  Set custom logging configuration. The following *name*s are supported:
   548  
   549  - **path**: specify a path to the log file
   550  (e.g. **--log-opt path=/var/log/container/mycontainer.json**);
   551  
   552  - **max-size**: specify a max size of the log file
   553  (e.g. **--log-opt max-size=10mb**);
   554  
   555  - **tag**: specify a custom log tag for the container
   556  (e.g. **--log-opt tag="{{.ImageName}}"**.
   557  
   558  It supports the same keys as **podman inspect --format**.
   559  
   560  This option is currently supported only by the **journald** log driver.
   561  
   562  #### **--mac-address**=*address*
   563  
   564  Container network interface MAC address (e.g. 92:d0:c6:0a:29:33)
   565  This option can only be used if the container is joined to only a single network - i.e., **--network=_network-name_** is used at most once -
   566  and if the container is not joining another container's network namespace via **--network=container:_id_**.
   567  
   568  Remember that the MAC address in an Ethernet network must be unique.
   569  The IPv6 link-local address will be based on the device's MAC address
   570  according to RFC4862.
   571  
   572  To specify multiple static MAC addresses per container, set multiple networks using the **--network** option with a static MAC address specified for each using the `mac` mode for that option.
   573  
   574  #### **--memory**, **-m**=*limit*
   575  
   576  Memory limit (format: `<number>[<unit>]`, where unit = b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes))
   577  
   578  Allows you to constrain the memory available to a container. If the host
   579  supports swap memory, then the **-m** memory setting can be larger than physical
   580  RAM. If a limit of 0 is specified (not using **-m**), the container's memory is
   581  not limited. The actual limit may be rounded up to a multiple of the operating
   582  system's page size (the value would be very large, that's millions of trillions).
   583  
   584  #### **--memory-reservation**=*limit*
   585  
   586  Memory soft limit (format: `<number>[<unit>]`, where unit = b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes))
   587  
   588  After setting memory reservation, when the system detects memory contention
   589  or low memory, containers are forced to restrict their consumption to their
   590  reservation. So you should always set the value below **--memory**, otherwise the
   591  hard limit will take precedence. By default, memory reservation will be the same
   592  as memory limit.
   593  
   594  #### **--memory-swap**=*limit*
   595  
   596  A limit value equal to memory plus swap. Must be used with the  **-m**
   597  (**--memory**) flag. The swap `LIMIT` should always be larger than **-m**
   598  (**--memory**) value. By default, the swap `LIMIT` will be set to double
   599  the value of --memory.
   600  
   601  The format of `LIMIT` is `<number>[<unit>]`. Unit can be `b` (bytes),
   602  `k` (kibibytes), `m` (mebibytes), or `g` (gibibytes). If you don't specify a
   603  unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
   604  
   605  #### **--memory-swappiness**=*number*
   606  
   607  Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
   608  
   609  This flag is not supported on cgroups V2 systems.
   610  
   611  #### **--mount**=*type=TYPE,TYPE-SPECIFIC-OPTION[,...]*
   612  
   613  Attach a filesystem mount to the container
   614  
   615  Current supported mount TYPEs are **bind**, **volume**, **image**, **tmpfs** and **devpts**. <sup>[[1]](#Footnote1)</sup>
   616  
   617         e.g.
   618  
   619         type=bind,source=/path/on/host,destination=/path/in/container
   620  
   621         type=bind,src=/path/on/host,dst=/path/in/container,relabel=shared
   622  
   623         type=bind,src=/path/on/host,dst=/path/in/container,relabel=shared,U=true
   624  
   625         type=volume,source=vol1,destination=/path/in/container,ro=true
   626  
   627         type=tmpfs,tmpfs-size=512M,destination=/path/in/container
   628  
   629         type=image,source=fedora,destination=/fedora-image,rw=true
   630  
   631         type=devpts,destination=/dev/pts
   632  
   633         Common Options:
   634  
   635  	      · src, source: mount source spec for bind and volume. Mandatory for bind.
   636  
   637  	      · dst, destination, target: mount destination spec.
   638  
   639         Options specific to volume:
   640  
   641  	      · ro, readonly: true or false (default).
   642  
   643  	      . U, chown: true or false (default). Change recursively the owner and group of the source volume based on the UID and GID of the container.
   644  
   645  	      · idmap: true or false (default).  If specified, create an idmapped mount to the target user namespace in the container.
   646  
   647         Options specific to image:
   648  
   649  	      · rw, readwrite: true or false (default).
   650  
   651         Options specific to bind:
   652  
   653  	      · ro, readonly: true or false (default).
   654  
   655  	      · bind-propagation: shared, slave, private, unbindable, rshared, rslave, runbindable, or rprivate(default). See also mount(2).
   656  
   657  	      . bind-nonrecursive: do not setup a recursive bind mount. By default it is recursive.
   658  
   659  	      . relabel: shared, private.
   660  
   661  	      · idmap: true or false (default).  If specified, create an idmapped mount to the target user namespace in the container.
   662  
   663  	      . U, chown: true or false (default). Change recursively the owner and group of the source volume based on the UID and GID of the container.
   664  
   665         Options specific to tmpfs:
   666  
   667  	      · ro, readonly: true or false (default).
   668  
   669  	      · tmpfs-size: Size of the tmpfs mount in bytes. Unlimited by default in Linux.
   670  
   671  	      · tmpfs-mode: File mode of the tmpfs in octal. (e.g. 700 or 0700.) Defaults to 1777 in Linux.
   672  
   673  	      · tmpcopyup: Enable copyup from the image directory at the same location to the tmpfs. Used by default.
   674  
   675  	      · notmpcopyup: Disable copying files from the image to the tmpfs.
   676  
   677  	      . U, chown: true or false (default). Change recursively the owner and group of the source volume based on the UID and GID of the container.
   678  
   679         Options specific to devpts:
   680  
   681  	      · uid: UID of the file owner (default 0).
   682  
   683  	      · gid: GID of the file owner (default 0).
   684  
   685  	      · mode: permission mask for the file (default 600).
   686  
   687  	      · max: maximum number of PTYs (default 1048576).
   688  
   689  #### **--name**=*name*
   690  
   691  Assign a name to the container
   692  
   693  The operator can identify a container in three ways:
   694  UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”)
   695  UUID short identifier (“f78375b1c487”)
   696  Name (“jonah”)
   697  
   698  podman generates a UUID for each container, and if a name is not assigned
   699  to the container with **--name** then it will generate a random
   700  string name. The name is useful any place you need to identify a container.
   701  This works for both background and foreground containers.
   702  
   703  #### **--network**=*mode*, **--net**
   704  
   705  Set the network mode for the container. Invalid if using **--dns**, **--dns-opt**, or **--dns-search** with **--network** set to **none** or **container:**_id_. If used together with **--pod**, the container will not join the pod's network namespace.
   706  
   707  Valid _mode_ values are:
   708  
   709  - **bridge[:OPTIONS,...]**: Create a network stack on the default bridge. This is the default for rootful containers. It is possible to specify these additional options:
   710    - **alias=name**: Add network-scoped alias for the container.
   711    - **ip=IPv4**: Specify a static ipv4 address for this container.
   712    - **ip=IPv6**: Specify a static ipv6 address for this container.
   713    - **mac=MAC**: Specify a static mac address for this container.
   714    - **interface_name**: Specify a name for the created network interface inside the container.
   715  
   716    For example to set a static ipv4 address and a static mac address, use `--network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99`.
   717  - \<network name or ID\>[:OPTIONS,...]: Connect to a user-defined network; this is the network name or ID from a network created by **[podman network create](podman-network-create.1.md)**. Using the network name implies the bridge network mode. It is possible to specify the same options described under the bridge mode above. You can use the **--network** option multiple times to specify additional networks.
   718  - **none**: Create a network namespace for the container but do not configure network interfaces for it, thus the container has no network connectivity.
   719  - **container:**_id_: Reuse another container's network stack.
   720  - **host**: Do not create a network namespace, the container will use the host's network. Note: The host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
   721  - **ns:**_path_: Path to a network namespace to join.
   722  - **private**: Create a new namespace for the container. This will use the **bridge** mode for rootful containers and **slirp4netns** for rootless ones.
   723  - **slirp4netns[:OPTIONS,...]**: use **slirp4netns**(1) to create a user network stack. This is the default for rootless containers. It is possible to specify these additional options, they can also be set with `network_cmd_options` in containers.conf:
   724    - **allow_host_loopback=true|false**: Allow the slirp4netns to reach the host loopback IP (`10.0.2.2`). Default is false.
   725    - **mtu=MTU**: Specify the MTU to use for this network. (Default is `65520`).
   726    - **cidr=CIDR**: Specify ip range to use for this network. (Default is `10.0.2.0/24`).
   727    - **enable_ipv6=true|false**: Enable IPv6. Default is true. (Required for `outbound_addr6`).
   728    - **outbound_addr=INTERFACE**: Specify the outbound interface slirp should bind to (ipv4 traffic only).
   729    - **outbound_addr=IPv4**: Specify the outbound ipv4 address slirp should bind to.
   730    - **outbound_addr6=INTERFACE**: Specify the outbound interface slirp should bind to (ipv6 traffic only).
   731    - **outbound_addr6=IPv6**: Specify the outbound ipv6 address slirp should bind to.
   732    - **port_handler=rootlesskit**: Use rootlesskit for port forwarding. Default.
   733    Note: Rootlesskit changes the source IP address of incoming packets to an IP address in the container network namespace, usually `10.0.2.100`. If your application requires the real source IP address, e.g. web server logs, use the slirp4netns port handler. The rootlesskit port handler is also used for rootless containers when connected to user-defined networks.
   734    - **port_handler=slirp4netns**: Use the slirp4netns port forwarding, it is slower than rootlesskit but preserves the correct source IP address. This port handler cannot be used for user-defined networks.
   735  
   736  #### **--network-alias**=*alias*
   737  
   738  Add a network-scoped alias for the container, setting the alias for all networks that the container joins. To set a name only for a specific network, use the alias option as described under the **--network** option.
   739  Network aliases work only with the bridge networking mode. This option can be specified multiple times.
   740  NOTE: A container will only have access to aliases on the first network that it joins. This is a limitation that will be removed in a later release.
   741  
   742  #### **--no-healthcheck**
   743  
   744  Disable any defined healthchecks for container.
   745  
   746  #### **--no-hosts**
   747  
   748  Do not create _/etc/hosts_ for the container.
   749  By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
   750  **--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
   751  This option conflicts with **--add-host**.
   752  
   753  #### **--oom-kill-disable**
   754  
   755  Whether to disable OOM Killer for the container or not.
   756  
   757  This flag is not supported on cgroups V2 systems.
   758  
   759  #### **--oom-score-adj**=*num*
   760  
   761  Tune the host's OOM preferences for containers (accepts -1000 to 1000)
   762  
   763  #### **--os**=*OS*
   764  Override the OS, defaults to hosts, of the image to be pulled. For example, `windows`.
   765  
   766  #### **--passwd-entry**=*ENTRY*
   767  
   768  Customize the entry that is written to the `/etc/passwd` file within the container when `--passwd` is used.
   769  
   770  The variables $USERNAME, $UID, $GID, $NAME, $HOME are automatically replaced with their value at runtime.
   771  
   772  #### **--personality**=*persona*
   773  
   774  Personality sets the execution domain via Linux personality(2).
   775  
   776  #### **--pid**=*pid*
   777  
   778  Set the PID mode for the container
   779  Default is to create a private PID namespace for the container
   780  - `container:<name|id>`: join another container's PID namespace
   781  - `host`: use the host's PID namespace for the container. Note: the host mode gives the container full access to local PID and is therefore considered insecure.
   782  - `ns`: join the specified PID namespace
   783  - `private`: create a new namespace for the container (default)
   784  
   785  #### **--pidfile**=*path*
   786  
   787  When the pidfile location is specified, the container process' PID will be written to the pidfile. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
   788  If the pidfile option is not specified, the container process' PID will be written to /run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile.
   789  
   790  After the container is started, the location for the pidfile can be discovered with the following `podman inspect` command:
   791  
   792      $ podman inspect --format '{{ .PidFile }}' $CID
   793      /run/containers/storage/${storage-driver}-containers/$CID/userdata/pidfile
   794  
   795  #### **--pids-limit**=*limit*
   796  
   797  Tune the container's pids limit. Set `-1` to have unlimited pids for the container. (default "4096" on systems that support PIDS cgroups).
   798  
   799  #### **--platform**=*OS/ARCH*
   800  
   801  Specify the platform for selecting the image.   (Conflicts with --arch and --os)
   802  The `--platform` option can be used to override the current architecture and operating system.
   803  
   804  #### **--pod**=*name*
   805  
   806  Run container in an existing pod. If you want Podman to make the pod for you, preference the pod name with `new:`.
   807  To make a pod with more granular options, use the `podman pod create` command before creating a container.
   808  
   809  #### **--pod-id-file**=*path*
   810  
   811  Run container in an existing pod and read the pod's ID from the specified file. If a container is run within a pod, and the pod has an infra-container, the infra-container will be started before the container is.
   812  
   813  #### **--privileged**
   814  
   815  Give extended privileges to this container. The default is *false*.
   816  
   817  By default, Podman containers are
   818  “unprivileged” (=false) and cannot, for example, modify parts of the operating system.
   819  This is because by default a container is not allowed to access any devices.
   820  A “privileged” container is given access to all devices.
   821  
   822  When the operator executes a privileged container, Podman enables access
   823  to all devices on the host, turns off graphdriver mount options, as well as
   824  turning off most of the security measures protecting the host from the
   825  container.
   826  
   827  Rootless containers cannot have more privileges than the account that launched them.
   828  
   829  #### **--publish**, **-p**=[[_ip_:][_hostPort_]:]_containerPort_[/_protocol_]
   830  
   831  Publish a container's port, or range of ports, to the host.
   832  
   833  Both hostPort and containerPort can be specified as a range of ports.
   834  When specifying ranges for both, the number of container ports in the
   835  range must match the number of host ports in the range.
   836  
   837  If host IP is set to 0.0.0.0 or not set at all, the port will be bound on all IPs on the host.
   838  
   839  By default, Podman will publish TCP ports. To publish a UDP port instead, give
   840  `udp` as protocol. To publish both TCP and UDP ports, set `--publish` twice,
   841  with `tcp`, and `udp` as protocols respectively. Rootful containers can also
   842  publish ports using the `sctp` protocol.
   843  
   844  Host port does not have to be specified (e.g. `podman run -p 127.0.0.1::80`).
   845  If it is not, the container port will be randomly assigned a port on the host.
   846  
   847  Use **podman port** to see the actual mapping: `podman port $CONTAINER $CONTAINERPORT`.
   848  
   849  **Note:** If a container will be run within a pod, it is not necessary to publish the port for
   850  the containers in the pod. The port must only be published by the pod itself. Pod network
   851  stacks act like the network stack on the host - you have a variety of containers in the pod,
   852  and programs in the container, all sharing a single interface and IP address, and
   853  associated ports. If one container binds to a port, no other container can use that port
   854  within the pod while it is in use. Containers in the pod can also communicate over localhost
   855  by having one container bind to localhost in the pod, and another connect to that port.
   856  
   857  #### **--publish-all**, **-P**
   858  
   859  Publish all exposed ports to random ports on the host interfaces. The default is *false*.
   860  
   861  When set to true publish all exposed ports to the host interfaces. The
   862  default is false. If the operator uses -P (or -p) then Podman will make the
   863  exposed port accessible on the host and the ports will be available to any
   864  client that can reach the host. When using -P, Podman will bind any exposed
   865  port to a random port on the host within an *ephemeral port range* defined by
   866  `/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host
   867  ports and the exposed ports, use `podman port`.
   868  
   869  #### **--pull**=*missing*
   870  
   871  Pull image before creating ("always"|"missing"|"never") (default "missing").
   872         'missing': default value, 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.
   873         '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.
   874         'never': do not pull the image from the registry, use only the local version. Raise an error if the image is not present locally.
   875  
   876  Defaults to *missing*.
   877  
   878  #### **--quiet**, **-q**
   879  
   880  Suppress output information when pulling images
   881  
   882  #### **--read-only**
   883  
   884  Mount the container's root filesystem as read only.
   885  
   886  By default a container will have its root filesystem writable allowing processes
   887  to write files anywhere. By specifying the `--read-only` flag the container will have
   888  its root filesystem mounted as read only prohibiting any writes.
   889  
   890  #### **--read-only-tmpfs**
   891  
   892  If container is running in --read-only mode, then mount a read-write tmpfs on /run, /tmp, and /var/tmp. The default is *true*
   893  
   894  #### **--replace**
   895  
   896  If another container with the same name already exists, replace and remove it. The default is **false**.
   897  
   898  #### **--requires**=**container**
   899  
   900  Specify one or more requirements.
   901  A requirement is a dependency container that will be started before this container.
   902  Containers can be specified by name or ID, with multiple containers being separated by commas.
   903  
   904  #### **--restart**=*policy*
   905  
   906  Restart policy to follow when containers exit.
   907  Restart policy will not take effect if a container is stopped via the `podman kill` or `podman stop` commands.
   908  
   909  Valid values are:
   910  
   911  - `no`                       : Do not restart containers on exit
   912  - `on-failure[:max_retries]` : Restart containers when they exit with a non-0 exit code, retrying indefinitely or until the optional max_retries count is hit
   913  - `always`                   : Restart containers when they exit, regardless of status, retrying indefinitely
   914  - `unless-stopped`           : Identical to **always**
   915  
   916  Please note that restart will not restart containers after a system reboot.
   917  If this functionality is required in your environment, you can invoke Podman from a systemd unit file, or create an init script for whichever init system is in use.
   918  To generate systemd unit files, please see *podman generate systemd*
   919  
   920  #### **--rm**
   921  
   922  Automatically remove the container when it exits. The default is *false*.
   923  
   924  #### **--rootfs**
   925  
   926  If specified, the first argument refers to an exploded container on the file system.
   927  
   928  This is useful to run a container without requiring any image management, the rootfs
   929  of the container is assumed to be managed externally.
   930  
   931    `Overlay Rootfs Mounts`
   932  
   933     The `:O` flag tells Podman to mount the directory from the rootfs path as
   934  storage using the `overlay file system`. The container processes
   935  can modify content within the mount point which is stored in the
   936  container storage in a separate directory. In overlay terms, the source
   937  directory will be the lower, and the container storage directory will be the
   938  upper. Modifications to the mount point are destroyed when the container
   939  finishes executing, similar to a tmpfs mount point being unmounted.
   940  
   941  #### **--sdnotify**=**container**|**conmon**|**ignore**
   942  
   943  Determines how to use the NOTIFY_SOCKET, as passed with systemd and Type=notify.
   944  
   945  Default is **container**, which means allow the OCI runtime to proxy the socket into the
   946  container to receive ready notification. Podman will set the MAINPID to conmon's pid.
   947  The **conmon** option sets MAINPID to conmon's pid, and sends READY when the container
   948  has started. The socket is never passed to the runtime or the container.
   949  The **ignore** option removes NOTIFY_SOCKET from the environment for itself and child processes,
   950  for the case where some other process above Podman uses NOTIFY_SOCKET and Podman should not use it.
   951  
   952  #### **--seccomp-policy**=*policy*
   953  
   954  Specify the policy to select the seccomp profile. If set to *image*, Podman will look for a "io.containers.seccomp.profile" label in the container-image config and use its value as a seccomp profile. Otherwise, Podman will follow the *default* policy by applying the default profile unless specified otherwise via *--security-opt seccomp* as described below.
   955  
   956  Note that this feature is experimental and may change in the future.
   957  
   958  #### **--secret**=*secret*[,opt=opt ...]
   959  
   960  Give the container access to a secret. Can be specified multiple times.
   961  
   962  A secret is a blob of sensitive data which a container needs at runtime but
   963  should not be stored in the image or in source control, such as usernames and passwords,
   964  TLS certificates and keys, SSH keys or other important generic strings or binary content (up to 500 kb in size).
   965  
   966  When secrets are specified as type `mount`, the secrets are copied and mounted into the container when a container is created.
   967  When secrets are specified as type `env`, the secret will be set as an environment variable within the container.
   968  Secrets are written in the container at the time of container creation, and modifying the secret using `podman secret` commands
   969  after the container is created will not affect the secret inside the container.
   970  
   971  Secrets and its storage are managed using the `podman secret` command.
   972  
   973  Secret Options
   974  
   975  - `type=mount|env`    : How the secret will be exposed to the container. Default mount.
   976  - `target=target`     : Target of secret. Defaults to secret name.
   977  - `uid=0`             : UID of secret. Defaults to 0. Mount secret type only.
   978  - `gid=0`             : GID of secret. Defaults to 0. Mount secret type only.
   979  - `mode=0`            : Mode of secret. Defaults to 0444. Mount secret type only.
   980  
   981  #### **--security-opt**=*option*
   982  
   983  Security Options
   984  
   985  - `apparmor=unconfined` : Turn off apparmor confinement for the container
   986  - `apparmor=your-profile` : Set the apparmor confinement profile for the container
   987  
   988  - `label=user:USER`     : Set the label user for the container processes
   989  - `label=role:ROLE`     : Set the label role for the container processes
   990  - `label=type:TYPE`     : Set the label process type for the container processes
   991  - `label=level:LEVEL`   : Set the label level for the container processes
   992  - `label=filetype:TYPE` : Set the label file type for the container files
   993  - `label=disable`       : Turn off label separation for the container
   994  
   995  Note: Labeling can be disabled for all containers by setting label=false in the **containers.conf** (`/etc/containers/containers.conf` or `$HOME/.config/containers/containers.conf`) file.
   996  
   997  - `mask=/path/1:/path/2` : The paths to mask separated by a colon. A masked path
   998    cannot be accessed inside the container.
   999  
  1000  - `no-new-privileges` : Disable container processes from gaining additional privileges
  1001  
  1002  - `seccomp=unconfined` : Turn off seccomp confinement for the container.
  1003  - `seccomp=profile.json` : JSON file to be used as a seccomp filter. Note that the `io.podman.annotations.seccomp` annotation is set with the specified value as shown in `podman inspect`.
  1004  
  1005  - `proc-opts=OPTIONS` : Comma-separated list of options to use for the /proc mount. More details for the
  1006    possible mount options are specified in the **proc(5)** man page.
  1007  
  1008  
  1009  - **unmask**=_ALL_ or _/path/1:/path/2_, or shell expanded paths (/proc/*): Paths to unmask separated by a colon. If set to **ALL**, it will unmask all the paths that are masked or made read only by default.
  1010    The default masked paths are **/proc/acpi, /proc/kcore, /proc/keys, /proc/latency_stats, /proc/sched_debug, /proc/scsi, /proc/timer_list, /proc/timer_stats, /sys/firmware, and /sys/fs/selinux.**  The default paths that are read only are **/proc/asound, /proc/bus, /proc/fs, /proc/irq, /proc/sys, /proc/sysrq-trigger, /sys/fs/cgroup**.
  1011  
  1012  Note: Labeling can be disabled for all containers by setting label=false in the **containers.conf** (`/etc/containers/containers.conf` or `$HOME/.config/containers/containers.conf`) file.
  1013  
  1014  #### **--shm-size**=*size*
  1015  
  1016  Size of `/dev/shm` (format: `<number>[<unit>]`, where unit = b (bytes), k (kibibytes), m (mebibytes), or g (gibibytes))
  1017  If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`.
  1018  When size is `0`, there is no limit on the amount of memory used for IPC by the container.
  1019  
  1020  #### **--stop-signal**=*SIGTERM*
  1021  
  1022  Signal to stop a container. Default is SIGTERM.
  1023  
  1024  #### **--stop-timeout**=*seconds*
  1025  
  1026  Timeout (in seconds) to stop a container. Default is 10.
  1027  Remote connections use local containers.conf for defaults
  1028  
  1029  #### **--subgidname**=*name*
  1030  
  1031  Name for GID map from the `/etc/subgid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--gidmap`.
  1032  
  1033  #### **--subuidname**=*name*
  1034  
  1035  Name for UID map from the `/etc/subuid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--uidmap`.
  1036  
  1037  #### **--sysctl**=*SYSCTL*
  1038  
  1039  Configure namespaced kernel parameters at runtime
  1040  
  1041  IPC Namespace - current sysctls allowed:
  1042  
  1043  kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall, kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced
  1044  Sysctls beginning with fs.mqueue.*
  1045  
  1046  Note: if you use the --ipc=host option these sysctls will not be allowed.
  1047  
  1048  Network Namespace - current sysctls allowed:
  1049      Sysctls beginning with net.*
  1050  
  1051  Note: if you use the --network=host option these sysctls will not be allowed.
  1052  
  1053  #### **--systemd**=*true|false|always*
  1054  
  1055  Run container in systemd mode. The default is *true*.
  1056  
  1057  The value *always* enforces the systemd mode is enforced without
  1058  looking at the executable name. Otherwise, if set to true and the
  1059  command you are running inside the container is **systemd**, **/usr/sbin/init**,
  1060  **/sbin/init** or **/usr/local/sbin/init**.
  1061  
  1062  Running the container in systemd mode causes the following changes:
  1063  
  1064  * Podman mounts tmpfs file systems on the following directories
  1065    * _/run_
  1066    * _/run/lock_
  1067    * _/tmp_
  1068    * _/sys/fs/cgroup/systemd_
  1069    * _/var/lib/journal_
  1070  * Podman sets the default stop signal to **SIGRTMIN+3**.
  1071  * Podman sets **container_uuid** environment variable in the container to the
  1072  first 32 characters of the container id.
  1073  
  1074  This allows systemd to run in a confined container without any modifications.
  1075  
  1076  Note: On `SELinux` systems, systemd attempts to write to the cgroup
  1077  file system. Containers writing to the cgroup file system are denied by default.
  1078  The `container_manage_cgroup` boolean must be enabled for this to be allowed on an SELinux separated system.
  1079  
  1080  `setsebool -P container_manage_cgroup true`
  1081  
  1082  #### **--timeout**=*seconds*
  1083  
  1084  Maximum time a container is allowed to run before conmon sends it the kill
  1085  signal.  By default containers will run until they exit or are stopped by
  1086  `podman stop`.
  1087  
  1088  #### **--tls-verify**
  1089  
  1090  Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in registries.conf.
  1091  
  1092  #### **--tmpfs**=*fs*
  1093  
  1094  Create a tmpfs mount
  1095  
  1096  Mount a temporary filesystem (`tmpfs`) mount into a container, for example:
  1097  
  1098  $ podman create -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image
  1099  
  1100  This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
  1101  options are the same as the Linux default `mount` flags. If you do not specify
  1102  any options, the systems uses the following options:
  1103  `rw,noexec,nosuid,nodev`.
  1104  
  1105  #### **--tty**, **-t**
  1106  
  1107  Allocate a pseudo-TTY. The default is *false*.
  1108  
  1109  When set to true Podman will allocate a pseudo-tty and attach to the standard
  1110  input of the container. This can be used, for example, to run a throwaway
  1111  interactive shell. The default is false.
  1112  
  1113  Note: The **-t** option is incompatible with a redirection of the Podman client
  1114  standard input.
  1115  
  1116  #### **--tz**=*timezone*
  1117  
  1118  Set timezone in container. This flag takes area-based timezones, GMT time, as well as `local`, which sets the timezone in the container to match the host machine. See `/usr/share/zoneinfo/` for valid timezones.
  1119  Remote connections use local containers.conf for defaults
  1120  
  1121  #### **--uidmap**=*container_uid*:*from_uid*:*amount*
  1122  
  1123  Run the container in a new user namespace using the supplied mapping. This
  1124  option conflicts with the **--userns** and **--subuidname** options. This
  1125  option provides a way to map host UIDs to container UIDs. It can be passed
  1126  several times to map different ranges.
  1127  
  1128  The _from_uid_ value is based upon the user running the command, either rootful or rootless users.
  1129  * rootful user:  *container_uid*:*host_uid*:*amount*
  1130  * rootless user: *container_uid*:*intermediate_uid*:*amount*
  1131  
  1132  When **podman create** is called by a privileged user, the option **--uidmap**
  1133  works as a direct mapping between host UIDs and container UIDs.
  1134  
  1135  host UID -> container UID
  1136  
  1137  The _amount_ specifies the number of consecutive UIDs that will be mapped.
  1138  If for example _amount_ is **4** the mapping would look like:
  1139  
  1140  |   host UID     |    container UID    |
  1141  | -              | -                   |
  1142  | _from_uid_     | _container_uid_     |
  1143  | _from_uid_ + 1 | _container_uid_ + 1 |
  1144  | _from_uid_ + 2 | _container_uid_ + 2 |
  1145  | _from_uid_ + 3 | _container_uid_ + 3 |
  1146  
  1147  When **podman create** is called by an unprivileged user (i.e. running rootless),
  1148  the value _from_uid_ is interpreted as an "intermediate UID". In the rootless
  1149  case, host UIDs are not mapped directly to container UIDs. Instead the mapping
  1150  happens over two mapping steps:
  1151  
  1152  host UID -> intermediate UID -> container UID
  1153  
  1154  The **--uidmap** option only influences the second mapping step.
  1155  
  1156  The first mapping step is derived by Podman from the contents of the file
  1157  _/etc/subuid_ and the UID of the user calling Podman.
  1158  
  1159  First mapping step:
  1160  
  1161  | host UID                                         | intermediate UID |
  1162  | -                                                |                - |
  1163  | UID for the user starting Podman                 |                0 |
  1164  | 1st subordinate UID for the user starting Podman |                1 |
  1165  | 2nd subordinate UID for the user starting Podman |                2 |
  1166  | 3rd subordinate UID for the user starting Podman |                3 |
  1167  | nth subordinate UID for the user starting Podman |                n |
  1168  
  1169  To be able to use intermediate UIDs greater than zero, the user needs to have
  1170  subordinate UIDs configured in _/etc/subuid_. See **subuid**(5).
  1171  
  1172  The second mapping step is configured with **--uidmap**.
  1173  
  1174  If for example _amount_ is **5** the second mapping step would look like:
  1175  
  1176  |   intermediate UID   |    container UID    |
  1177  | -                    | -                   |
  1178  | _from_uid_           | _container_uid_     |
  1179  | _from_uid_ + 1       | _container_uid_ + 1 |
  1180  | _from_uid_ + 2       | _container_uid_ + 2 |
  1181  | _from_uid_ + 3       | _container_uid_ + 3 |
  1182  | _from_uid_ + 4       | _container_uid_ + 4 |
  1183  
  1184  The current user ID is mapped to UID=0 in the rootless user namespace.
  1185  Every additional range is added sequentially afterward:
  1186  
  1187  |   host                |rootless user namespace | length              |
  1188  | -                     | -                      | -                   |
  1189  | $UID                  | 0                      | 1                   |
  1190  | 1                     | $FIRST_RANGE_ID        | $FIRST_RANGE_LENGTH |
  1191  | 1+$FIRST_RANGE_LENGTH | $SECOND_RANGE_ID       | $SECOND_RANGE_LENGTH|
  1192  
  1193  Even if a user does not have any subordinate UIDs in  _/etc/subuid_,
  1194  **--uidmap** could still be used to map the normal UID of the user to a
  1195  container UID by running `podman create --uidmap $container_uid:0:1 --user $container_uid ...`.
  1196  
  1197  Note: the **--uidmap** flag cannot be called in conjunction with the **--pod** flag as a uidmap cannot be set on the container level when in a pod.
  1198  
  1199  #### **--ulimit**=*option*
  1200  
  1201  Ulimit options
  1202  
  1203  You can pass `host` to copy the current configuration from the host.
  1204  
  1205  #### **--umask**=*umask*
  1206  
  1207  Set the umask inside the container. Defaults to `0022`.
  1208  Remote connections use local containers.conf for defaults
  1209  
  1210  #### **--unsetenv**=*env*
  1211  
  1212  Unset default environment variables for the container. Default environment
  1213  variables include variables provided natively by Podman, environment variables
  1214  configured by the image, and environment variables from containers.conf.
  1215  
  1216  #### **--unsetenv-all**=*true|false*
  1217  
  1218  Unset all default environment variables for the container. Default environment
  1219  variables include variables provided natively by Podman, environment variables
  1220  configured by the image, and environment variables from containers.conf.
  1221  
  1222  #### **--user**, **-u**=*user*
  1223  
  1224  Sets the username or UID used and optionally the groupname or GID for the specified command.
  1225  
  1226  The following examples are all valid:
  1227  --user [user | user:group | uid | uid:gid | user:gid | uid:group ]
  1228  
  1229  Without this argument the command will be run as root in the container.
  1230  
  1231  #### **--userns**=*mode*
  1232  
  1233  Set the user namespace mode for the container. It defaults to the **PODMAN_USERNS** environment variable. An empty value ("") means user namespaces are disabled unless an explicit mapping is set with the **--uidmap** and **--gidmap** options.
  1234  
  1235  Rootless user --userns=Key mappings:
  1236  
  1237  Key       | Host User |  Container User
  1238  ----------|---------------|---------------------
  1239  ""        |$UID           |0 (Default User account mapped to root user in container.)
  1240  keep-id   |$UID           |$UID (Map user account to same UID within container.)
  1241  auto      |$UID           | nil (Host User UID is not mapped into container.)
  1242  nomap     |$UID           | nil (Host User UID is not mapped into container.)
  1243  
  1244  Valid _mode_ values are:
  1245  
  1246  **auto**[:_OPTIONS,..._]: automatically create a unique user namespace.
  1247  
  1248  The `--userns=auto` flag, requires that the user name `containers` and a range of subordinate user ids that the Podman container is allowed to use be specified in the /etc/subuid and /etc/subgid files.
  1249  
  1250  Example: `containers:2147483647:2147483648`.
  1251  
  1252  Podman allocates unique ranges of UIDs and GIDs from the `containers` subordinate user ids. The size of the ranges is based on the number of UIDs required in the image. The number of UIDs and GIDs can be overridden with the `size` option. The `auto` options currently does not work in rootless mode
  1253  
  1254    Valid `auto` options:
  1255  
  1256    - *gidmapping*=_CONTAINER_GID:HOST_GID:SIZE_: to force a GID mapping to be present in the user namespace.
  1257    - *size*=_SIZE_: to specify an explicit size for the automatic user namespace. e.g. `--userns=auto:size=8192`. If `size` is not specified, `auto` will estimate a size for the user namespace.
  1258    - *uidmapping*=_CONTAINER_UID:HOST_UID:SIZE_: to force a UID mapping to be present in the user namespace.
  1259  
  1260  **container:**_id_: join the user namespace of the specified container.
  1261  
  1262  **host**: run in the user namespace of the caller. The processes running in the container will have the same privileges on the host as any other process launched by the calling user (default).
  1263  
  1264  **keep-id**: creates a user namespace where the current rootless user's UID:GID are mapped to the same values in the container. This option is not allowed for containers created by the root user.
  1265  
  1266  **nomap**: creates a user namespace where the current rootless user's UID:GID are not mapped into the container. This option is not allowed for containers created by the root user.
  1267  
  1268  **ns:**_namespace_: run the container in the given existing user namespace.
  1269  
  1270  **private**: create a new namespace for the container.
  1271  
  1272  This option is incompatible with **--gidmap**, **--uidmap**, **--subuidname** and **--subgidname**.
  1273  
  1274  #### **--uts**=*mode*
  1275  
  1276  Set the UTS namespace mode for the container. The following values are supported:
  1277  
  1278  - **host**: use the host's UTS namespace inside the container.
  1279  - **private**: create a new namespace for the container (default).
  1280  - **ns:[path]**: run the container in the given existing UTS namespace.
  1281  - **container:[container]**: join the UTS namespace of the specified container.
  1282  
  1283  #### **--variant**=*VARIANT*
  1284  Use _VARIANT_ instead of the default architecture variant of the container image. Some images can use multiple variants of the arm architectures, such as arm/v5 and arm/v7.
  1285  
  1286  #### **--volume**, **-v**[=*[[SOURCE-VOLUME|HOST-DIR:]CONTAINER-DIR[:OPTIONS]]*]
  1287  
  1288  Create a bind mount. If you specify, ` -v /HOST-DIR:/CONTAINER-DIR`, Podman
  1289  bind mounts `/HOST-DIR` in the host to `/CONTAINER-DIR` in the Podman
  1290  container. Similarly, `-v SOURCE-VOLUME:/CONTAINER-DIR` will mount the volume
  1291  in the host to the container. If no such named volume exists, Podman will
  1292  create one. The `OPTIONS` are a comma-separated list and can be: <sup>[[1]](#Footnote1)</sup>  (Note when using the remote client, including Mac and Windows (excluding WSL2) machines, the volumes will be mounted from the remote server, not necessarily the client machine.)
  1293  
  1294  The _options_ is a comma-separated list and can be:
  1295  
  1296  * **rw**|**ro**
  1297  * **z**|**Z**
  1298  * [**r**]**shared**|[**r**]**slave**|[**r**]**private**[**r**]**unbindable**
  1299  * [**r**]**bind**
  1300  * [**no**]**exec**
  1301  * [**no**]**dev**
  1302  * [**no**]**suid**
  1303  * [**O**]
  1304  * [**U**]
  1305  
  1306  The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The volume
  1307  will be mounted into the container at this directory.
  1308  
  1309  Volumes may specify a source as well, as either a directory on the host
  1310  or the name of a named volume. If no source is given, the volume will be created as an
  1311  anonymously named volume with a randomly generated name, and will be removed when
  1312  the container is removed via the `--rm` flag or `podman rm --volumes`.
  1313  
  1314  If a volume source is specified, it must be a path on the host or the name of a
  1315  named volume. Host paths are allowed to be absolute or relative; relative paths
  1316  are resolved relative to the directory Podman is run in. If the source does not
  1317  exist, Podman will return an error. Users must pre-create the source files or
  1318  directories.
  1319  
  1320  Any source that does not begin with a `.` or `/` will be treated as the name of
  1321  a named volume. If a volume with that name does not exist, it will be created.
  1322  Volumes created with names are not anonymous, and they are not removed by the `--rm`
  1323  option and the `podman rm --volumes` command.
  1324  
  1325  You can specify multiple  **-v** options to mount one or more volumes into a
  1326  container.
  1327  
  1328    `Write Protected Volume Mounts`
  1329  
  1330  You can add `:ro` or `:rw` suffix to a volume to mount it read-only or
  1331  read-write mode, respectively. By default, the volumes are mounted read-write.
  1332  See examples.
  1333  
  1334    `Chowning Volume Mounts`
  1335  
  1336  By default, Podman does not change the owner and group of source volume
  1337  directories mounted into containers. If a container is created in a new user
  1338  namespace, the UID and GID in the container may correspond to another UID and
  1339  GID on the host.
  1340  
  1341  The `:U` suffix tells Podman to use the correct host UID and GID based on the
  1342  UID and GID within the container, to change recursively the owner and group of
  1343  the source volume.
  1344  
  1345  **Warning** use with caution since this will modify the host filesystem.
  1346  
  1347    `Labeling Volume Mounts`
  1348  
  1349  Labeling systems like SELinux require that proper labels are placed on volume
  1350  content mounted into a container. Without a label, the security system might
  1351  prevent the processes running inside the container from using the content. By
  1352  default, Podman does not change the labels set by the OS.
  1353  
  1354  To change a label in the container context, you can add either of two suffixes
  1355  `:z` or `:Z` to the volume mount. These suffixes tell Podman to relabel file
  1356  objects on the shared volumes. The `z` option tells Podman that two containers
  1357  share the volume content. As a result, Podman labels the content with a shared
  1358  content label. Shared volume labels allow all containers to read/write content.
  1359  The `Z` option tells Podman to label the content with a private unshared label.
  1360  Only the current container can use a private volume.
  1361  
  1362  Note: Do not relabel system files and directories. Relabeling system content
  1363  might cause other confined services on your machine to fail.  For these types
  1364  of containers we recommend disabling SELinux separation.  The option
  1365  `--security-opt label=disable` disables SELinux separation for containers used in the build.
  1366  For example if a user wanted to volume mount their entire home directory into a
  1367  container, they need to disable SELinux separation.
  1368  
  1369  	   $ podman create --security-opt label=disable -v $HOME:/home/user fedora touch /home/user/file
  1370  
  1371    `Overlay Volume Mounts`
  1372  
  1373     The `:O` flag tells Podman to mount the directory from the host as a
  1374  temporary storage using the `overlay file system`. The container processes
  1375  can modify content within the mountpoint which is stored in the
  1376  container storage in a separate directory. In overlay terms, the source
  1377  directory will be the lower, and the container storage directory will be the
  1378  upper. Modifications to the mount point are destroyed when the container
  1379  finishes executing, similar to a tmpfs mount point being unmounted.
  1380  
  1381    Subsequent executions of the container will see the original source directory
  1382  content, any changes from previous container executions no longer exist.
  1383  
  1384    One use case of the overlay mount is sharing the package cache from the
  1385  host into the container to allow speeding up builds.
  1386  
  1387    Note:
  1388  
  1389       - The `O` flag conflicts with other options listed above.
  1390  Content mounted into the container is labeled with the private label.
  1391         On SELinux systems, labels in the source directory must be readable
  1392  by the container label. Usually containers can read/execute `container_share_t`
  1393  and can read/write `container_file_t`. If you cannot change the labels on a
  1394  source volume, SELinux container separation must be disabled for the container
  1395  to work.
  1396       - The source directory mounted into the container with an overlay mount
  1397  should not be modified, it can cause unexpected failures. It is recommended
  1398  that you do not modify the directory until the container finishes running.
  1399  
  1400    `Mounts propagation`
  1401  
  1402  By default bind mounted volumes are `private`. That means any mounts done
  1403  inside container will not be visible on host and vice versa. One can change
  1404  this behavior by specifying a volume mount propagation property. Making a
  1405  volume `shared` mounts done under that volume inside container will be
  1406  visible on host and vice versa. Making a volume `slave` enables only one
  1407  way mount propagation and that is mounts done on host under that volume
  1408  will be visible inside container but not the other way around. <sup>[[1]](#Footnote1)</sup>
  1409  
  1410  To control mount propagation property of a volume one can use the [**r**]**shared**,
  1411  [**r**]**slave**, [**r**]**private** or the [**r**]**unbindable** propagation flag.
  1412  Propagation property can be specified only for bind mounted volumes and not for
  1413  internal volumes or named volumes. For mount propagation to work the source mount
  1414  point (the mount point where source dir is mounted on) has to have the right propagation
  1415  properties. For shared volumes, the source mount point has to be shared. And for
  1416  slave volumes, the source mount point has to be either shared or slave.
  1417  <sup>[[1]](#Footnote1)</sup>
  1418  
  1419  If you want to recursively mount a volume and all of its submounts into a
  1420  container, then you can use the `rbind` option. By default the bind option is
  1421  used, and submounts of the source directory will not be mounted into the
  1422  container.
  1423  
  1424  Mounting the volume with the `nosuid` options means that SUID applications on
  1425  the volume will not be able to change their privilege. By default volumes
  1426  are mounted with `nosuid`.
  1427  
  1428  Mounting the volume with the noexec option means that no executables on the
  1429  volume will be able to be executed within the container.
  1430  
  1431  Mounting the volume with the nodev option means that no devices on the volume
  1432  will be able to be used by processes within the container. By default volumes
  1433  are mounted with `nodev`.
  1434  
  1435  If the `<source-dir>` is a mount point, then "dev", "suid", and "exec" options are
  1436  ignored by the kernel.
  1437  
  1438  Use `df <source-dir>` to figure out the source mount and then use
  1439  `findmnt -o TARGET,PROPAGATION <source-mount-dir>` to figure out propagation
  1440  properties of source mount. If `findmnt` utility is not available, then one
  1441  can look at mount entry for source mount point in `/proc/self/mountinfo`. Look
  1442  at `optional fields` and see if any propagation properties are specified.
  1443  `shared:X` means mount is `shared`, `master:X` means mount is `slave` and if
  1444  nothing is there that means mount is `private`. <sup>[[1]](#Footnote1)</sup>
  1445  
  1446  To change propagation properties of a mount point use `mount` command. For
  1447  example, if one wants to bind mount source directory `/foo` one can do
  1448  `mount --bind /foo /foo` and `mount --make-private --make-shared /foo`. This
  1449  will convert /foo into a `shared` mount point. Alternatively one can directly
  1450  change propagation properties of source mount. Say `/` is source mount for
  1451  `/foo`, then use `mount --make-shared /` to convert `/` into a `shared` mount.
  1452  
  1453  Note: if the user only has access rights via a group, accessing the volume
  1454  from inside a rootless container will fail. Use the `--group-add keep-groups`
  1455  flag to pass the user's supplementary group access into the container.
  1456  
  1457  #### **--volumes-from**[=*CONTAINER*[:*OPTIONS*]]
  1458  
  1459  Mount volumes from the specified container(s). Used to share volumes between
  1460  containers. The *options* is a comma-separated list with the following available elements:
  1461  
  1462  * **rw**|**ro**
  1463  * **z**
  1464  
  1465  Mounts already mounted volumes from a source container onto another
  1466  container. You must supply the source's container-id or container-name.
  1467  To share a volume, use the --volumes-from option when running
  1468  the target container. You can share volumes even if the source container
  1469  is not running.
  1470  
  1471  By default, Podman mounts the volumes in the same mode (read-write or
  1472  read-only) as it is mounted in the source container.
  1473  You can change this by adding a `ro` or `rw` _option_.
  1474  
  1475  Labeling systems like SELinux require that proper labels are placed on volume
  1476  content mounted into a container. Without a label, the security system might
  1477  prevent the processes running inside the container from using the content. By
  1478  default, Podman does not change the labels set by the OS.
  1479  
  1480  To change a label in the container context, you can add `z` to the volume mount.
  1481  This suffix tells Podman to relabel file objects on the shared volumes. The `z`
  1482  option tells Podman that two containers share the volume content. As a result,
  1483  Podman labels the content with a shared content label. Shared volume labels allow
  1484  all containers to read/write content.
  1485  
  1486  If the location of the volume from the source container overlaps with
  1487  data residing on a target container, then the volume hides
  1488  that data on the target.
  1489  
  1490  #### **--workdir**, **-w**=*dir*
  1491  
  1492  Working directory inside the container
  1493  
  1494  The default working directory for running binaries within a container is the root directory (/).
  1495  The image developer can set a different default with the WORKDIR instruction. The operator
  1496  can override the working directory by using the **-w** option.
  1497  
  1498  ## EXAMPLES
  1499  
  1500  ### Create a container using a local image
  1501  
  1502  ```
  1503  $ podman create alpine ls
  1504  ```
  1505  
  1506  ### Create a container using a local image and annotate it
  1507  
  1508  ```
  1509  $ podman create --annotation HELLO=WORLD alpine ls
  1510  ```
  1511  
  1512  ### Create a container using a local image, allocating a pseudo-TTY, keeping stdin open and name it myctr
  1513  
  1514  ```
  1515    podman create -t -i --name myctr alpine ls
  1516  ```
  1517  
  1518  ### Set UID/GID mapping in a new user namespace
  1519  
  1520  Running a container in a new user namespace requires a mapping of
  1521  the uids and gids from the host.
  1522  
  1523  ```
  1524  $ podman create --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
  1525  ```
  1526  
  1527  ### Setting automatic user namespace separated containers
  1528  
  1529  ```
  1530  # podman create --userns=auto:size=65536 ubi8-init
  1531  ```
  1532  
  1533  ### Configure timezone in a container
  1534  
  1535  ```
  1536  $ podman create --tz=local alpine date
  1537  $ podman create --tz=Asia/Shanghai alpine date
  1538  $ podman create --tz=US/Eastern alpine date
  1539  ```
  1540  
  1541  ### Adding dependency containers
  1542  
  1543  Podman will make sure the first container, container1, is running before the second container (container2) is started.
  1544  
  1545  ```
  1546  $ podman create --name container1 -t -i fedora bash
  1547  $ podman create --name container2 --requires container1 -t -i fedora bash
  1548  $ podman start --attach container2
  1549  ```
  1550  
  1551  Multiple containers can be required.
  1552  
  1553  ```
  1554  $ podman create --name container1 -t -i fedora bash
  1555  $ podman create --name container2 -t -i fedora bash
  1556  $ podman create --name container3 --requires container1,container2 -t -i fedora bash
  1557  $ podman start --attach container3
  1558  ```
  1559  
  1560  ### Configure keep supplemental groups for access to volume
  1561  
  1562  ```
  1563  $ podman create -v /var/lib/design:/var/lib/design --group-add keep-groups ubi8
  1564  ```
  1565  
  1566  ### Configure execution domain for containers using personality flag
  1567  
  1568  ```
  1569  $ podman create --name container1 --personaity=LINUX32 fedora bash
  1570  ```
  1571  
  1572  ### Create a container with external rootfs mounted as an overlay
  1573  
  1574  ```
  1575  $ podman create --name container1 --rootfs /path/to/rootfs:O bash
  1576  ```
  1577  
  1578  ### Create a container connected to two networks (called net1 and net2) with a static ip
  1579  
  1580  ```
  1581  $ podman create --network net1:ip=10.89.1.5 --network net2:ip=10.89.10.10 alpine ip addr
  1582  ```
  1583  
  1584  ### Rootless Containers
  1585  
  1586  Podman runs as a non-root user on most systems. This feature requires that a new enough version of shadow-utils
  1587  be installed. The shadow-utils package must include the newuidmap and newgidmap executables.
  1588  
  1589  In order for users to run rootless, there must be an entry for their username in /etc/subuid and /etc/subgid which lists the UIDs for their user namespace.
  1590  
  1591  Rootless Podman works better if the fuse-overlayfs and slirp4netns packages are installed.
  1592  The fuse-overlayfs package provides a userspace overlay storage driver, otherwise users need to use
  1593  the vfs storage driver, which is diskspace expensive and does not perform well. slirp4netns is
  1594  required for VPN, without it containers need to be run with the --network=host flag.
  1595  
  1596  ## ENVIRONMENT
  1597  
  1598  Environment variables within containers can be set using multiple different options:  This section describes the precedence.
  1599  
  1600  Precedence order (later entries override earlier entries):
  1601  
  1602  - **--env-host** : Host environment of the process executing Podman is added.
  1603  - **--http-proxy**: By default, several environment variables will be passed in from the host, such as **http_proxy** and **no_proxy**. See **--http-proxy** for details.
  1604  - Container image : Any environment variables specified in the container image.
  1605  - **--env-file** : Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
  1606  - **--env** : Any environment variables specified will override previous settings.
  1607  
  1608  Create containers and set the environment ending with a __*__ and a *****
  1609  
  1610  ```
  1611  $ export ENV1=a
  1612  $ podman create --name ctr --env ENV* alpine printenv ENV1
  1613  $ podman start --attach ctr
  1614  a
  1615  
  1616  $ podman create --name ctr --env ENV*****=b alpine printenv ENV*****
  1617  $ podman start --attach ctr
  1618  b
  1619  ```
  1620  
  1621  ## CONMON
  1622  
  1623  When Podman starts a container it actually executes the conmon program, which
  1624  then executes the OCI Runtime.  Conmon is the container monitor.  It is a small
  1625  program whose job is to watch the primary process of the container, and if the
  1626  container dies, save the exit code.  It also holds open the tty of the
  1627  container, so that it can be attached to later. This is what allows Podman to
  1628  run in detached mode (backgrounded), so Podman can exit but conmon continues to
  1629  run.  Each container has their own instance of conmon. Conmon waits for the
  1630  container to exit, gathers and saves the exit code, and then launches a Podman
  1631  process to complete the container cleanup, by shutting down the network and
  1632  storage.   For more information on conmon, please reference the conmon(8) man
  1633  page.
  1634  
  1635  ## FILES
  1636  
  1637  **/etc/subuid**
  1638  **/etc/subgid**
  1639  
  1640  NOTE: Use the environment variable `TMPDIR` to change the temporary storage location of downloaded container images. Podman defaults to use `/var/tmp`.
  1641  
  1642  ## SEE ALSO
  1643  **[podman(1)](podman.1.md)**, **[podman-save(1)](podman-save.1.md)**, **[podman-ps(1)](podman-ps.1.md)**, **[podman-attach(1)](podman-attach.1.md)**, **[podman-pod-create(1)](podman-pod-create.1.md)**, **[podman-port(1)](podman-port.1.md)**, **[podman-start(1)](podman-start.1.md)**, **[podman-kill(1)](podman-kill.1.md)**, **[podman-stop(1)](podman-stop.1.md)**, **[podman-generate-systemd(1)](podman-generate-systemd.1.md)**, **[podman-rm(1)](podman-rm.1.md)**, **[subgid(5)](https://www.unix.com/man-page/linux/5/subgid)**, **[subuid(5)](https://www.unix.com/man-page/linux/5/subuid)**, **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)**, **[systemd.unit(5)](https://www.freedesktop.org/software/systemd/man/systemd.unit.html)**, **[setsebool(8)](https://man7.org/linux/man-pages/man8/setsebool.8.html)**, **[slirp4netns(1)](https://github.com/rootless-containers/slirp4netns/blob/master/slirp4netns.1.md)**, **[fuse-overlayfs(1)](https://github.com/containers/fuse-overlayfs/blob/main/fuse-overlayfs.1.md)**, **proc(5)**, **[conmon(8)](https://github.com/containers/conmon/blob/main/docs/conmon.8.md)**, **personality(2)**
  1644  
  1645  ## HISTORY
  1646  October 2017, converted from Docker documentation to Podman by Dan Walsh for Podman `<dwalsh@redhat.com>`
  1647  
  1648  November 2014, updated by Sven Dowideit `<SvenDowideit@home.org.au>`
  1649  
  1650  September 2014, updated by Sven Dowideit `<SvenDowideit@home.org.au>`
  1651  
  1652  August 2014, updated by Sven Dowideit `<SvenDowideit@home.org.au>`
  1653  
  1654  ## FOOTNOTES
  1655  <a name="Footnote1">1</a>: The Podman project is committed to inclusivity, a core value of open source. The `master` and `slave` mount propagation terminology used here is problematic and divisive, and should be changed. However, these terms are currently used within the Linux kernel and must be used as-is at this time. When the kernel maintainers rectify this usage, Podman will follow suit immediately.