mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Merge pull request #15260 from edsantiago/docs_dedup_continued
Man pages: refactor common options
This commit is contained in:
2
docs/source/markdown/.gitignore
vendored
2
docs/source/markdown/.gitignore
vendored
@ -1,5 +1,7 @@
|
||||
podman-build.1.md
|
||||
podman-container-clone.1.md
|
||||
podman-create.1.md
|
||||
podman-kube-play.1.md
|
||||
podman-pod-clone.1.md
|
||||
podman-pod-create.1.md
|
||||
podman-pull.1.md
|
||||
|
6
docs/source/markdown/options/add-host.md
Normal file
6
docs/source/markdown/options/add-host.md
Normal file
@ -0,0 +1,6 @@
|
||||
#### **--add-host**=*host:ip*
|
||||
|
||||
Add a custom host-to-IP mapping (host:ip)
|
||||
|
||||
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
|
||||
option can be set multiple times. Conflicts with the **--no-hosts** option.
|
5
docs/source/markdown/options/cgroup-parent.md
Normal file
5
docs/source/markdown/options/cgroup-parent.md
Normal file
@ -0,0 +1,5 @@
|
||||
#### **--cgroup-parent**=*path*
|
||||
|
||||
Path to cgroups under which the cgroup for the <<container|pod>> 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.
|
10
docs/source/markdown/options/cgroupns.md
Normal file
10
docs/source/markdown/options/cgroupns.md
Normal file
@ -0,0 +1,10 @@
|
||||
#### **--cgroupns**=*mode*
|
||||
|
||||
Set the cgroup namespace mode for the container.
|
||||
|
||||
- **host**: use the host's cgroup namespace inside the container.
|
||||
- **container:**_id_: join the namespace of the specified container.
|
||||
- **private**: create a new cgroup namespace.
|
||||
- **ns:**_path_: join the namespace at the specified path.
|
||||
|
||||
If the host uses cgroups v1, the default is set to **host**. On cgroups v2, the default is **private**.
|
10
docs/source/markdown/options/cgroups.md
Normal file
10
docs/source/markdown/options/cgroups.md
Normal file
@ -0,0 +1,10 @@
|
||||
#### **--cgroups**=*how*
|
||||
|
||||
Determines whether the container will create CGroups.
|
||||
|
||||
Default is **enabled**.
|
||||
|
||||
The **enabled** option will create a new cgroup under the cgroup-parent.
|
||||
The **disabled** option will force the container to not create CGroups, and thus conflicts with CGroup options (**--cgroupns** and **--cgroup-parent**).
|
||||
The **no-conmon** option disables a new CGroup only for the **conmon** process.
|
||||
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**.
|
4
docs/source/markdown/options/conmon-pidfile.md
Normal file
4
docs/source/markdown/options/conmon-pidfile.md
Normal file
@ -0,0 +1,4 @@
|
||||
#### **--conmon-pidfile**=*file*
|
||||
|
||||
Write the pid of the **conmon** process to a file. As **conmon** runs in a separate process than Podman, this is necessary when using systemd to restart Podman containers.
|
||||
(This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
10
docs/source/markdown/options/cpu-period.md
Normal file
10
docs/source/markdown/options/cpu-period.md
Normal file
@ -0,0 +1,10 @@
|
||||
#### **--cpu-period**=*limit*
|
||||
|
||||
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
|
||||
duration in microseconds. Once the container's CPU quota is used up, it will
|
||||
not be scheduled to run until the current period ends. Defaults to 100000
|
||||
microseconds.
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
12
docs/source/markdown/options/cpu-quota.md
Normal file
12
docs/source/markdown/options/cpu-quota.md
Normal file
@ -0,0 +1,12 @@
|
||||
#### **--cpu-quota**=*limit*
|
||||
|
||||
Limit the CPU Completely Fair Scheduler (CFS) quota.
|
||||
|
||||
Limit the container's CPU usage. By default, containers run with the full
|
||||
CPU resource. The limit is a number in microseconds. If a number is provided,
|
||||
the container will be allowed to use that much CPU time until the CPU period
|
||||
ends (controllable via **--cpu-period**).
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
7
docs/source/markdown/options/cpu-rt-period.md
Normal file
7
docs/source/markdown/options/cpu-rt-period.md
Normal file
@ -0,0 +1,7 @@
|
||||
#### **--cpu-rt-period**=*microseconds*
|
||||
|
||||
Limit the CPU real-time period in microseconds.
|
||||
|
||||
Limit the container's Real Time CPU usage. This option tells the kernel to restrict the container's Real Time CPU usage to the period specified.
|
||||
|
||||
This option is not supported on cgroups V2 systems.
|
10
docs/source/markdown/options/cpu-rt-runtime.md
Normal file
10
docs/source/markdown/options/cpu-rt-runtime.md
Normal file
@ -0,0 +1,10 @@
|
||||
#### **--cpu-rt-runtime**=*microseconds*
|
||||
|
||||
Limit the CPU real-time runtime in microseconds.
|
||||
|
||||
Limit the containers Real Time CPU usage. This option tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex:
|
||||
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.
|
||||
|
||||
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
|
||||
|
||||
This option is not supported on cgroups V2 systems.
|
35
docs/source/markdown/options/cpu-shares.md
Normal file
35
docs/source/markdown/options/cpu-shares.md
Normal file
@ -0,0 +1,35 @@
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight).
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This
|
||||
proportion can be modified by changing the container's CPU share weighting
|
||||
relative to the combined weight of all the running containers.
|
||||
Default weight is **1024**.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If a fourth container is added with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores.
|
||||
If the container _C0_ is started with **--cpu-shares=512** running one process,
|
||||
and another container _C1_ with **--cpu-shares=1024** running two processes,
|
||||
this can result in the following division of CPU shares:
|
||||
|
||||
| PID | container | CPU | CPU share |
|
||||
| ---- | ----------- | ------- | ------------ |
|
||||
| 100 | C0 | 0 | 100% of CPU0 |
|
||||
| 101 | C1 | 1 | 100% of CPU1 |
|
||||
| 102 | C1 | 2 | 100% of CPU2 |
|
5
docs/source/markdown/options/cpuset-cpus.md
Normal file
5
docs/source/markdown/options/cpuset-cpus.md
Normal file
@ -0,0 +1,5 @@
|
||||
#### **--cpuset-cpus**=*number*
|
||||
|
||||
CPUs in which to allow execution. Can be specified as a comma-separated list
|
||||
(e.g. **0,1**), as a range (e.g. **0-3**), or any combination thereof
|
||||
(e.g. **0-3,7,11-15**).
|
8
docs/source/markdown/options/cpuset-mems.md
Normal file
8
docs/source/markdown/options/cpuset-mems.md
Normal file
@ -0,0 +1,8 @@
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
|
||||
NUMA systems.
|
||||
|
||||
If there are four memory nodes on the system (0-3), use **--cpuset-mems=0,1**
|
||||
then processes in the container will only use memory from the first
|
||||
two memory nodes.
|
5
docs/source/markdown/options/no-hosts.md
Normal file
5
docs/source/markdown/options/no-hosts.md
Normal file
@ -0,0 +1,5 @@
|
||||
#### **--no-hosts**
|
||||
|
||||
Do not create _/etc/hosts_ for the <<container|pod>>.
|
||||
By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
|
||||
**--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
|
@ -47,12 +47,7 @@ command to see these containers. External containers can be removed with the
|
||||
|
||||
## OPTIONS
|
||||
|
||||
#### **--add-host**=*host*
|
||||
|
||||
Add a custom host-to-IP mapping (host:ip)
|
||||
|
||||
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host** option
|
||||
can be set multiple times. Conflicts with the --no-hosts option.
|
||||
@@option add-host
|
||||
|
||||
#### **--all-platforms**
|
||||
|
||||
@ -183,11 +178,7 @@ given.
|
||||
Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry. (Default: /etc/containers/certs.d)
|
||||
Please refer to containers-certs.d(5) for details. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
||||
|
||||
#### **--cgroup-parent**=*path*
|
||||
|
||||
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.
|
||||
@@option cgroup-parent
|
||||
|
||||
#### **--cgroupns**=*how*
|
||||
|
||||
@ -206,80 +197,15 @@ Thus, compressing the data before sending it is irrelevant to Podman. (This opti
|
||||
|
||||
Set additional flags to pass to the C Preprocessor cpp(1). Containerfiles ending with a ".in" suffix will be preprocessed via cpp(1). This option can be used to pass additional flags to cpp.Note: You can also set default CPPFLAGS by setting the BUILDAH_CPPFLAGS environment variable (e.g., export BUILDAH_CPPFLAGS="-DDEBUG").
|
||||
|
||||
#### **--cpu-period**=*limit*
|
||||
@@option cpu-period
|
||||
|
||||
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
|
||||
duration in microseconds. Once the container's CPU quota is used up, it will
|
||||
not be scheduled to run until the current period ends. Defaults to 100000
|
||||
microseconds.
|
||||
@@option cpu-quota
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
@@option cpu-shares
|
||||
|
||||
#### **--cpu-quota**=*limit*
|
||||
@@option cpuset-cpus
|
||||
|
||||
Limit the CPU Completely Fair Scheduler (CFS) quota.
|
||||
|
||||
Limit the container's CPU usage. By default, containers run with the full
|
||||
CPU resource. The limit is a number in microseconds. If you provide a number,
|
||||
the container will be allowed to use that much CPU time until the CPU period
|
||||
ends (controllable via **--cpu-period**).
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight)
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This
|
||||
proportion can be modified by changing the container's CPU share weighting
|
||||
relative to the weighting of all other running containers.
|
||||
|
||||
To modify the proportion from the default of 1024, use the **--cpu-shares**
|
||||
option to set the weighting to 2 or higher.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If you add a fourth container with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores. If you start one
|
||||
container **{C0}** with **-c=512** running one process, and another container
|
||||
**{C1}** with **-c=1024** running two processes, this can result in the
|
||||
following
|
||||
division of CPU shares:
|
||||
|
||||
PID container CPU CPU share
|
||||
100 {C0} 0 100% of CPU0
|
||||
101 {C1} 1 100% of CPU1
|
||||
102 {C1} 2 100% of CPU2
|
||||
|
||||
#### **--cpuset-cpus**=*num*
|
||||
|
||||
CPUs in which to allow execution (0-3, 0,1)
|
||||
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on
|
||||
NUMA systems.
|
||||
|
||||
If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1`
|
||||
then processes in your container will only use memory from the first
|
||||
two memory nodes.
|
||||
@@option cpuset-mems
|
||||
|
||||
#### **--creds**=*creds*
|
||||
|
||||
@ -520,11 +446,8 @@ considered insecure.
|
||||
Do not use existing cached images for the container build. Build from the start
|
||||
with a new set of cached layers.
|
||||
|
||||
#### **--no-hosts**
|
||||
@@option no-hosts
|
||||
|
||||
Do not create _/etc/hosts_ for the container.
|
||||
By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
|
||||
**--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
|
||||
This option conflicts with **--add-host**.
|
||||
|
||||
#### **--omit-history**
|
@ -15,93 +15,21 @@ podman\-container\-clone - Creates a copy of an existing container
|
||||
|
||||
@@option blkio-weight-device
|
||||
|
||||
#### **--cpu-period**=*limit*
|
||||
|
||||
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
|
||||
duration in microseconds. Once the container's CPU quota is used up, it will
|
||||
not be scheduled to run until the current period ends. Defaults to 100000
|
||||
microseconds.
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
@@option cpu-period
|
||||
|
||||
If none is specified, the original container's cpu period is used
|
||||
|
||||
#### **--cpu-quota**=*limit*
|
||||
|
||||
Limit the CPU Completely Fair Scheduler (CFS) quota.
|
||||
|
||||
Limit the container's CPU usage. By default, containers run with the full
|
||||
CPU resource. The limit is a number in microseconds. If a number is provided,
|
||||
the container will be allowed to use that much CPU time until the CPU period
|
||||
ends (controllable via **--cpu-period**).
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/master/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
@@option cpu-quota
|
||||
|
||||
If none is specified, the original container's CPU quota are used.
|
||||
|
||||
#### **--cpu-rt-period**=*microseconds*
|
||||
|
||||
Limit the CPU real-time period in microseconds
|
||||
|
||||
Limit the container's Real Time CPU usage. This option tells the kernel to restrict the container's Real Time CPU usage to the period specified.
|
||||
|
||||
This option is not supported on cgroups V2 systems.
|
||||
@@option cpu-rt-period
|
||||
|
||||
If none is specified, the original container's CPU runtime period is used.
|
||||
|
||||
@@option cpu-rt-runtime
|
||||
|
||||
#### **--cpu-rt-runtime**=*microseconds*
|
||||
|
||||
Limit the CPU real-time runtime in microseconds.
|
||||
|
||||
Limit the containers Real Time CPU usage. This option tells the kernel to limit the amount of time in a given CPU period Real Time tasks may consume. Ex:
|
||||
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.
|
||||
|
||||
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
|
||||
|
||||
This option is not supported on cgroups V2 systems.
|
||||
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight)
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This proportion
|
||||
can be modified by changing the container's CPU share weighting relative
|
||||
to the weighting of all other running containers.
|
||||
|
||||
To modify the proportion from the default of 1024, use the **--cpu-shares**
|
||||
option to set the weighting to 2 or higher.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If a fourth container is added with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores.
|
||||
If the container _C0_ is started with **--cpu-shares=512** running one process,
|
||||
and another container _C1_ with **--cpu-shares=1024** running two processes,
|
||||
this can result in the following division of CPU shares:
|
||||
|
||||
| PID | container | CPU | CPU share |
|
||||
| ---- | ----------- | ------- | ------------ |
|
||||
| 100 | C0 | 0 | 100% of CPU0 |
|
||||
| 101 | C1 | 1 | 100% of CPU1 |
|
||||
| 102 | C1 | 2 | 100% of CPU2 |
|
||||
@@option cpu-shares
|
||||
|
||||
If none are specified, the original container's CPU shares are used.
|
||||
|
||||
@ -112,17 +40,11 @@ Set a number of CPUs for the container that overrides the original containers CP
|
||||
This is shorthand
|
||||
for **--cpu-period** and **--cpu-quota**, so only **--cpus** or either both the **--cpu-period** and **--cpu-quota** options can be set.
|
||||
|
||||
#### **--cpuset-cpus**
|
||||
@@option cpuset-cpus
|
||||
|
||||
CPUs in which to allow execution (0-3, 0,1). If none are specified, the original container's CPUset is used.
|
||||
If none are specified, the original container's CPUset is used.
|
||||
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
|
||||
If there are four memory nodes on the system (0-3), use `--cpuset-mems=0,1`
|
||||
then processes in the container will only use memory from the first
|
||||
two memory nodes.
|
||||
@@option cpuset-mems
|
||||
|
||||
If none are specified, the original container's CPU memory nodes are used.
|
||||
|
||||
|
@ -66,12 +66,7 @@ and specified with a _tag_.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
#### **--add-host**=*host*
|
||||
|
||||
Add a custom host-to-IP mapping (host:ip)
|
||||
|
||||
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
|
||||
option can be set multiple times.
|
||||
@@option add-host
|
||||
|
||||
#### **--annotation**=*key=value*
|
||||
|
||||
@ -111,29 +106,11 @@ Block IO relative device weight.
|
||||
|
||||
@@option cgroup-conf
|
||||
|
||||
#### **--cgroup-parent**=*path*
|
||||
@@option cgroup-parent
|
||||
|
||||
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.
|
||||
@@option cgroupns
|
||||
|
||||
#### **--cgroupns**=*mode*
|
||||
|
||||
Set the cgroup namespace mode for the container.
|
||||
**`host`**: use the host's cgroup namespace inside the container.
|
||||
**`container:<NAME|ID>`**: join the namespace of the specified container.
|
||||
**`ns:<PATH>`**: join the namespace at the specified path.
|
||||
**`private`**: create a new cgroup namespace.
|
||||
|
||||
If the host uses cgroups v1, the default is set to **host**. On cgroups v2 the default is **private**.
|
||||
|
||||
#### **--cgroups**=*mode*
|
||||
|
||||
Determines whether the container will create CGroups.
|
||||
Valid values are *enabled*, *disabled*, *no-conmon*, *split*, with the default being *enabled*.
|
||||
|
||||
The *enabled* option will create a new cgroup under the cgroup-parent.
|
||||
The *disabled* option will force the container to not create CGroups, and thus conflicts with CGroup options (**--cgroupns** and **--cgroup-parent**).
|
||||
The *no-conmon* option disables a new CGroup only for the conmon process.
|
||||
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*.
|
||||
@@option cgroups
|
||||
|
||||
@@option chrootdirs
|
||||
|
||||
@ -141,91 +118,17 @@ The *split* option splits the current cgroup in two sub-cgroups: one for conmon
|
||||
|
||||
Write the container ID to the file
|
||||
|
||||
#### **--conmon-pidfile**=*path*
|
||||
@@option conmon-pidfile
|
||||
|
||||
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.
|
||||
(This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
||||
@@option cpu-period
|
||||
|
||||
#### **--cpu-period**=*limit*
|
||||
@@option cpu-quota
|
||||
|
||||
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
|
||||
duration in microseconds. Once the container's CPU quota is used up, it will
|
||||
not be scheduled to run until the current period ends. Defaults to 100000
|
||||
microseconds.
|
||||
@@option cpu-rt-period
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
@@option cpu-rt-runtime
|
||||
|
||||
#### **--cpu-quota**=*limit*
|
||||
|
||||
Limit the CPU Completely Fair Scheduler (CFS) quota.
|
||||
|
||||
Limit the container's CPU usage. By default, containers run with the full
|
||||
CPU resource. The limit is a number in microseconds. If you provide a number,
|
||||
the container will be allowed to use that much CPU time until the CPU period
|
||||
ends (controllable via **--cpu-period**).
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
|
||||
#### **--cpu-rt-period**=*microseconds*
|
||||
|
||||
Limit the CPU real-time period in microseconds
|
||||
|
||||
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.
|
||||
|
||||
This flag is not supported on cgroups V2 systems.
|
||||
|
||||
#### **--cpu-rt-runtime**=*microseconds*
|
||||
|
||||
Limit the CPU real-time runtime in microseconds
|
||||
|
||||
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:
|
||||
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.
|
||||
|
||||
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
|
||||
|
||||
This flag is not supported on cgroups V2 systems.
|
||||
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight)
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This proportion
|
||||
can be modified by changing the container's CPU share weighting relative
|
||||
to the weighting of all other running containers.
|
||||
|
||||
To modify the proportion from the default of 1024, use the **--cpu-shares**
|
||||
flag to set the weighting to 2 or higher.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If you add a fourth container with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores.
|
||||
If the container _C0_ is started with **--cpu-shares=512** running one process,
|
||||
and another container _C1_ with **--cpu-shares=1024** running two processes,
|
||||
this can result in the following division of CPU shares:
|
||||
|
||||
| PID | container | CPU | CPU share |
|
||||
| ---- | ----------- | ------- | ------------ |
|
||||
| 100 | C0 | 0 | 100% of CPU0 |
|
||||
| 101 | C1 | 1 | 100% of CPU1 |
|
||||
| 102 | C1 | 2 | 100% of CPU2 |
|
||||
@@option cpu-shares
|
||||
|
||||
#### **--cpus**=*number*
|
||||
|
||||
@ -237,17 +140,9 @@ On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
|
||||
#### **--cpuset-cpus**=*cpus*
|
||||
@@option cpuset-cpus
|
||||
|
||||
CPUs in which to allow execution (0-3, 0,1)
|
||||
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
|
||||
If you have four memory nodes on your system (0-3), use `--cpuset-mems=0,1`
|
||||
then processes in your container will only use memory from the first
|
||||
two memory nodes.
|
||||
@@option cpuset-mems
|
||||
|
||||
#### **--device**=*host-device[:container-device][:permissions]*
|
||||
|
||||
@ -556,11 +451,8 @@ Valid _mode_ values are:
|
||||
|
||||
@@option no-healthcheck
|
||||
|
||||
#### **--no-hosts**
|
||||
@@option no-hosts
|
||||
|
||||
Do not create _/etc/hosts_ for the container.
|
||||
By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
|
||||
**--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
|
||||
This option conflicts with **--add-host**.
|
||||
|
||||
@@option oom-kill-disable
|
||||
|
@ -214,11 +214,8 @@ Valid _mode_ values are:
|
||||
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.
|
||||
- **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.
|
||||
|
||||
#### **--no-hosts**
|
||||
@@option no-hosts
|
||||
|
||||
Do not create /etc/hosts for the pod.
|
||||
By default, Podman will manage /etc/hosts, adding the container's own IP address and any hosts from **--add-host**.
|
||||
**--no-hosts** disables this, and the image's **/etc/host** will be preserved unmodified.
|
||||
This option conflicts with host added in the Kubernetes YAML.
|
||||
|
||||
#### **--quiet**, **-q**
|
@ -15,63 +15,19 @@ podman\-pod\-clone - Creates a copy of an existing pod
|
||||
|
||||
@@option blkio-weight-device
|
||||
|
||||
#### **--cgroup-parent**=*path*
|
||||
@@option cgroup-parent
|
||||
|
||||
Path to cgroups under which the cgroup for the pod 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.
|
||||
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight)
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This proportion
|
||||
can be modified by changing the container's CPU share weighting relative
|
||||
to the weighting of all other running containers.
|
||||
|
||||
To modify the proportion from the default of 1024, use the **--cpu-shares**
|
||||
flag to set the weighting to 2 or higher.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If you add a fourth container with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores. If you start one
|
||||
container **{C0}** with **-c=512** running one process, and another container
|
||||
**{C1}** with **-c=1024** running two processes, this can result in the following
|
||||
division of CPU shares:
|
||||
|
||||
PID container CPU CPU share
|
||||
100 {C0} 0 100% of CPU0
|
||||
101 {C1} 1 100% of CPU1
|
||||
102 {C1} 2 100% of CPU2
|
||||
@@option cpu-shares
|
||||
|
||||
#### **--cpus**
|
||||
|
||||
Set a number of CPUs for the pod that overrides the original pods CPU limits. If none are specified, the original pod's Nano CPUs are used.
|
||||
|
||||
#### **--cpuset-cpus**
|
||||
@@option cpuset-cpus
|
||||
|
||||
CPUs in which to allow execution (0-3, 0,1). If none are specified, the original pod's CPUset is used.
|
||||
If none are specified, the original pod's CPUset is used.
|
||||
|
||||
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
|
||||
If there are four memory nodes on the system (0-3), use `--cpuset-mems=0,1`
|
||||
then processes in the container will only use memory from the first
|
||||
two memory nodes.
|
||||
@@option cpuset-mems
|
||||
|
||||
@@option destroy
|
||||
|
||||
|
@ -28,81 +28,25 @@ which by default, is the cgroup parent for all containers joining the pod. Conta
|
||||
|
||||
## OPTIONS
|
||||
|
||||
#### **--add-host**=*host:ip*
|
||||
@@option add-host
|
||||
|
||||
Add a custom host-to-IP mapping (host:ip)
|
||||
|
||||
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
|
||||
option can be set multiple times.
|
||||
The /etc/hosts file is shared between all containers in the pod.
|
||||
|
||||
@@option blkio-weight
|
||||
|
||||
@@option blkio-weight-device
|
||||
|
||||
#### **--cgroup-parent**=*path*
|
||||
@@option cgroup-parent
|
||||
|
||||
Path to cgroups under which the cgroup for the pod 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.
|
||||
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight)
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This proportion
|
||||
can be modified by changing the container's CPU share weighting relative
|
||||
to the weighting of all other running containers.
|
||||
|
||||
To modify the proportion from the default of 1024, use the **--cpu-shares**
|
||||
flag to set the weighting to 2 or higher.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If you add a fourth container with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores. If you start one
|
||||
container **{C0}** with **-c=512** running one process, and another container
|
||||
**{C1}** with **-c=1024** running two processes, this can result in the following
|
||||
division of CPU shares:
|
||||
|
||||
PID container CPU CPU share
|
||||
100 {C0} 0 100% of CPU0
|
||||
101 {C1} 1 100% of CPU1
|
||||
102 {C1} 2 100% of CPU2
|
||||
@@option cpu-shares
|
||||
|
||||
#### **--cpus**=*amount*
|
||||
|
||||
Set the total number of CPUs delegated to the pod. Default is 0.000 which indicates that there is no limit on computation power.
|
||||
|
||||
#### **--cpuset-cpus**=*amount*
|
||||
@@option cpuset-cpus
|
||||
|
||||
Limit the CPUs to support execution. First CPU is numbered 0. Unlike --cpus this is of type string and parsed as a list of numbers
|
||||
|
||||
Format is 0-3,0,1
|
||||
|
||||
Examples of the List Format:
|
||||
|
||||
0-4,9 # bits 0, 1, 2, 3, 4, and 9 set
|
||||
0-2,7,12-14 # bits 0, 1, 2, 7, 12, 13, and 14 set
|
||||
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
|
||||
|
||||
If there are four memory nodes on the system (0-3), use `--cpuset-mems=0,1`
|
||||
then processes in the container will only use memory from the first
|
||||
two memory nodes.
|
||||
@@option cpuset-mems
|
||||
|
||||
#### **--device**=_host-device_[**:**_container-device_][**:**_permissions_]
|
||||
|
||||
@ -260,11 +204,8 @@ Valid _mode_ values are:
|
||||
|
||||
@@option network-alias
|
||||
|
||||
#### **--no-hosts**
|
||||
@@option no-hosts
|
||||
|
||||
Do not create _/etc/hosts_ for the pod.
|
||||
By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
|
||||
**--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
|
||||
This option conflicts with **--add-host**.
|
||||
|
||||
@@option pid.pod
|
||||
|
@ -83,12 +83,7 @@ and specified with a _tag_.
|
||||
$ podman run oci-archive:/tmp/fedora echo hello
|
||||
|
||||
## OPTIONS
|
||||
#### **--add-host**=*host:ip*
|
||||
|
||||
Add a custom host-to-IP mapping (host:ip)
|
||||
|
||||
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
|
||||
option can be set multiple times.
|
||||
@@option add-host
|
||||
|
||||
#### **--annotation**=*key=value*
|
||||
|
||||
@ -126,31 +121,11 @@ environment variable.
|
||||
|
||||
@@option cgroup-conf
|
||||
|
||||
#### **--cgroup-parent**=*path*
|
||||
@@option cgroup-parent
|
||||
|
||||
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.
|
||||
@@option cgroupns
|
||||
|
||||
#### **--cgroupns**=*mode*
|
||||
|
||||
Set the cgroup namespace mode for the container.
|
||||
|
||||
- **host**: use the host's cgroup namespace inside the container.
|
||||
- **container:**_id_: join the namespace of the specified container.
|
||||
- **private**: create a new cgroup namespace.
|
||||
- **ns:**_path_: join the namespace at the specified path.
|
||||
|
||||
If the host uses cgroups v1, the default is set to **host**. On cgroups v2, the default is **private**.
|
||||
|
||||
#### **--cgroups**=*how*
|
||||
|
||||
Determines whether the container will create CGroups.
|
||||
|
||||
Default is **enabled**.
|
||||
|
||||
The **enabled** option will create a new cgroup under the cgroup-parent.
|
||||
The **disabled** option will force the container to not create CGroups, and thus conflicts with CGroup options (**--cgroupns** and **--cgroup-parent**).
|
||||
The **no-conmon** option disables a new CGroup only for the **conmon** process.
|
||||
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**.
|
||||
@@option cgroups
|
||||
|
||||
@@option chrootdirs
|
||||
|
||||
@ -158,88 +133,17 @@ The **split** option splits the current CGroup in two sub-cgroups: one for conmo
|
||||
|
||||
Write the container ID to *file*.
|
||||
|
||||
#### **--conmon-pidfile**=*file*
|
||||
@@option conmon-pidfile
|
||||
|
||||
Write the pid of the **conmon** process to a file. As **conmon** runs in a separate process than Podman, this is necessary when using systemd to restart Podman containers.
|
||||
(This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
|
||||
@@option cpu-period
|
||||
|
||||
#### **--cpu-period**=*limit*
|
||||
@@option cpu-quota
|
||||
|
||||
Set the CPU period for the Completely Fair Scheduler (CFS), which is a
|
||||
duration in microseconds. Once the container's CPU quota is used up, it will
|
||||
not be scheduled to run until the current period ends. Defaults to 100000
|
||||
microseconds.
|
||||
@@option cpu-rt-period
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
@@option cpu-rt-runtime
|
||||
|
||||
#### **--cpu-quota**=*limit*
|
||||
|
||||
Limit the CPU Completely Fair Scheduler (CFS) quota.
|
||||
|
||||
Limit the container's CPU usage. By default, containers run with the full
|
||||
CPU resource. The limit is a number in microseconds. If you provide a number,
|
||||
the container will be allowed to use that much CPU time until the CPU period
|
||||
ends (controllable via **--cpu-period**).
|
||||
|
||||
On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
|
||||
#### **--cpu-rt-period**=*microseconds*
|
||||
|
||||
Limit the CPU real-time period in microseconds.
|
||||
|
||||
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.
|
||||
|
||||
This flag is not supported on cgroups V2 systems.
|
||||
|
||||
#### **--cpu-rt-runtime**=*microseconds*
|
||||
|
||||
Limit the CPU real-time runtime in microseconds.
|
||||
|
||||
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:
|
||||
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.
|
||||
|
||||
The sum of all runtimes across containers cannot exceed the amount allotted to the parent cgroup.
|
||||
|
||||
This flag is not supported on cgroups V2 systems.
|
||||
|
||||
#### **--cpu-shares**, **-c**=*shares*
|
||||
|
||||
CPU shares (relative weight).
|
||||
|
||||
By default, all containers get the same proportion of CPU cycles. This proportion
|
||||
can be modified by changing the container's CPU share weighting relative
|
||||
to the combined weight of all the running containers. Default weight is **1024**.
|
||||
|
||||
The proportion will only apply when CPU-intensive processes are running.
|
||||
When tasks in one container are idle, other containers can use the
|
||||
left-over CPU time. The actual amount of CPU time will vary depending on
|
||||
the number of containers running on the system.
|
||||
|
||||
For example, consider three containers, one has a cpu-share of 1024 and
|
||||
two others have a cpu-share setting of 512. When processes in all three
|
||||
containers attempt to use 100% of CPU, the first container would receive
|
||||
50% of the total CPU time. If you add a fourth container with a cpu-share
|
||||
of 1024, the first container only gets 33% of the CPU. The remaining containers
|
||||
receive 16.5%, 16.5% and 33% of the CPU.
|
||||
|
||||
On a multi-core system, the shares of CPU time are distributed over all CPU
|
||||
cores. Even if a container is limited to less than 100% of CPU time, it can
|
||||
use 100% of each individual CPU core.
|
||||
|
||||
For example, consider a system with more than three cores.
|
||||
If the container _C0_ is started with **--cpu-shares=512** running one process,
|
||||
and another container _C1_ with **--cpu-shares=1024** running two processes,
|
||||
this can result in the following division of CPU shares:
|
||||
|
||||
| PID | container | CPU | CPU share |
|
||||
| ---- | ----------- | ------- | ------------ |
|
||||
| 100 | C0 | 0 | 100% of CPU0 |
|
||||
| 101 | C1 | 1 | 100% of CPU1 |
|
||||
| 102 | C1 | 2 | 100% of CPU2 |
|
||||
@@option cpu-shares
|
||||
|
||||
#### **--cpus**=*number*
|
||||
|
||||
@ -251,18 +155,9 @@ On some systems, changing the CPU limits may not be allowed for non-root
|
||||
users. For more details, see
|
||||
https://github.com/containers/podman/blob/main/troubleshooting.md#26-running-containers-with-cpu-limits-fails-with-a-permissions-error
|
||||
|
||||
#### **--cpuset-cpus**=*number*
|
||||
@@option cpuset-cpus
|
||||
|
||||
CPUs in which to allow execution. Can be specified as a comma-separated list
|
||||
(e.g. **0,1**), as a range (e.g. **0-3**), or any combination thereof
|
||||
(e.g. **0-3,7,11-15**).
|
||||
|
||||
#### **--cpuset-mems**=*nodes*
|
||||
|
||||
Memory nodes (MEMs) in which to allow execution. Only effective on NUMA systems.
|
||||
|
||||
For example, if you have four memory nodes (0-3) on your system, use **--cpuset-mems=0,1**
|
||||
to only use memory from the first two memory nodes.
|
||||
@@option cpuset-mems
|
||||
|
||||
#### **--detach**, **-d**
|
||||
|
||||
@ -569,11 +464,8 @@ Valid _mode_ values are:
|
||||
|
||||
@@option no-healthcheck
|
||||
|
||||
#### **--no-hosts**
|
||||
@@option no-hosts
|
||||
|
||||
Do not create _/etc/hosts_ for the container.
|
||||
By default, Podman will manage _/etc/hosts_, adding the container's own IP address and any hosts from **--add-host**.
|
||||
**--no-hosts** disables this, and the image's _/etc/hosts_ will be preserved unmodified.
|
||||
This option conflicts with **--add-host**.
|
||||
|
||||
@@option oom-kill-disable
|
||||
|
Reference in New Issue
Block a user