podman run详细参数
时间: 2024-04-29 15:04:39 浏览: 10
Podman是一个Linux容器工具,可以运行和管理OCI容器。Podman的run命令用于启动一个新容器。
下面是Podman run命令的详细参数:
```
Usage:
podman run [options] IMAGE [COMMAND] [ARG...]
Run a command in a new container
Options:
--add-host=[] Add a custom host-to-IP mapping (host:ip)
--annotation=[] Set annotations on the container
--attach=[] Attach to STDIN, STDOUT or STDERR
--authfile=[] Path of the authentication file
--blkio-weight=0 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
--blkio-weight-device=[] Block IO weight per cgroup per device, specified as a major:minor weight pair
--cap-add=[] Add Linux capabilities
--cap-drop=[] Drop Linux capabilities
--cgroup-parent="" Optional parent cgroup for the container
--cidfile="" Write the container ID to the file
--conmon-pidfile="" The file to write the conmon PID to
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
--cpu-rt-period=0 Limit CPU real-time period in microseconds
--cpu-rt-runtime=0 Limit CPU real-time runtime in microseconds
--cpu-shares=0 CPU shares (relative weight)
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems="" MEMs in which to allow execution (0-3, 0,1)
--detach-keys="" Override the key sequence for detaching a container
-d, --detach=false Detached mode: Run container in the background and print container ID
--device=[] Add a host device to the container
--device-cgroup-rule=[] Add a rule to the cgroup allowed devices list
--device-read-bps=[] Limit read rate (bytes per second) from a device (default [])
--device-read-iops=[] Limit read rate (I/O per second) from a device (default [])
--device-write-bps=[] Limit write rate (bytes per second) to a device (default [])
--device-write-iops=[] Limit write rate (I/O per second) to a device (default [])
--dns=[] Set custom DNS servers
--dns-opt=[] Set DNS options
--dns-search=[] Set custom DNS search domains
--entrypoint="" Overwrite the default ENTRYPOINT of the image
--env=[] Set environment variables
--env-file=[] Read in a file of environment variables
--expose=[] Expose a port or a range of ports
--group-add=[] Add additional groups to join
-h, --hostname="" Container host name
--init=false Run an init inside the container that forwards signals and reaps processes
--interactive=false Keep STDIN open even if not attached
--io-maxbandwidth=[] Maximum IO bandwidth limit (bytes per second) for a device (default [])
--io-maxiops=[] Maximum IO operations per second limit for a device (default [])
--ipc="" IPC namespace to use
--isolation="" Container isolation technology
--kernel-memory="" Kernel memory limit (format: <number><optional unit>, where unit = b, k, m or g)
--label=[] Set metadata on the container
--label-file=[] Read in a file of labels
--link=[] Add link to another container
--log-driver="" Logging driver for container
--log-opt=[] Logging driver options
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
--memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
--memory-reservation="" Memory soft limit (format: <number><optional unit>, where unit = b, k, m or g)
--memory-swap="" Total memory (memory + swap), '-1' to enable unlimited swap
--memory-swappiness=-1 Tune container memory swappiness (0 to 100) (-1 to use system default)
--mount=[] Attach a filesystem mount to the container
--name="" Assign a name to the container
--net="" Connect a container to a network
--oom-kill-disable=false Whether to disable OOM Killer for the container
--oom-score-adj=0 Tune host's OOM preferences (-1000 to 1000)
--pid="" PID namespace to use
--pids-limit=0 Tune container pids limit (set -1 for unlimited)
--pod="" Pod in which to run the container
--pod-config="" Path to a pod configuration file
--pod-manifest="" Pod manifest as JSON or YAML
--privileged=false Give extended privileges to this container
--publish-all=false Publish all exposed ports to random ports
--publish=[] Publish a container's port to the host
--read-only=false Mount the container's root filesystem as read only
--restart="" Restart policy to apply when a container exits
--rm=false Automatically remove the container when it exits
--runtime="" Runtime to use for this container
--security-opt=[] Security Options
--shm-size="" Size of /dev/shm, default value is 64MB
--sig-proxy=true Proxy received signals to the process (default true)
--stop-signal="SIGTERM" Signal to stop a container (default "SIGTERM")
--stop-timeout=10 Timeout (in seconds) to stop a container
--storage-opt=[] Storage driver options for the container
--sysctl=[] Sysctl options (default [])
--systemd=false Enable systemd init process
--tmpfs=[] Mount a tmpfs directory
--tty=false Allocate a pseudo-TTY
--ulimit=[] Ulimit options (default [])
--user="" Username or UID (format: <name|uid>[:<group|gid>])
--userns="" User namespace to use
--uts="" UTS namespace to use
--volume=[] Bind mount a volume
--volume-driver="" Optional volume driver for the container
--volumes-from=[] Mount volumes from the specified container(s)
--workdir="" Working directory inside the container
Args:
IMAGE Image to run
COMMAND Command to run in the container
ARG Arguments for the command
```