1/102
Flashcards for docker run options
Add a custom host-to-IP mapping (host:ip)
—add-host
Add an annotation to the container (passed through to the OCI runtime)
—annotation
Attach to STDIN, STDOUT or STDERR
-a, —attach
Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
—blkio-weight
Block IO weight (relative device weight)
—blkio-weight-device
Add Linux capabilities
—cap-add
Drop Linux capabilities
—cap-drop
Optional parent cgroup for the container
—cgroup-parent
Cgroup namespace to use (host|private)
‘host’: Run the container in the Docker host’s cgroup namespace
‘private’: Run the container in its own private cgroup namespace'
'‘: Use the cgroup namespace as configured by the default-cgroupns-mode option on the daemon (default)
—cgroupns
Write the container ID to the file
—cidfile
CPU count (Windows only)
—cpu-count
CPU percent (Windows only)
—cpu-percent
Limit CPU CFS (Completely Fair Scheduler) period
—cpu-period
Limit CPU CFS (Completely Fair Scheduler) quota
—cpu-quota
Limit CPU real-time period in microseconds
—cpu-rt-period
Limit CPU real-time runtime in microseconds
—cput-rt-runtime
CPU shares (relative weight)
-c, —cpu-shares
Number of CPUs
—cpus
CPUs in which to allow execution (0-3, 0, 1)
—cpuset-cpus
MEMs in which to allow execution (0-3, 0, 1)
—cpuset-mems
Run container in background and print container ID
-d, —detach
Override the key sequence for detaching a container
—detach-keys
Add a host device to the container
—device
Add a rule to the cgroup allowed devices list
—device-cgroup-rule
Limit read rate (bytes per second) from a device
—device-read-bps
Limit read rate (IO per second) from a device
—device-read-iops
Limit write rate (bytes per second) to a device
—device-write-bps
Limit write rate (IO per second) to a device
—device-write-iops
Skip image verification
—disable-content-trust true
Set custom DNS servers
—dns
Set DNS options
—dns-option
Set custom DNS search domains
—dns-search
Container NIS domain name
—domainname
Overwrite the default ENTRYPOINT of the image
—entrypoint
Set environment variables
-e, —env
Read in a file of environment variables
—env-file
Expose a port or range of ports
—expose
GPU devices to add to the container (‘all’ to pass all GPUs)
—gpus
Add additional groups to join
—group-add
Command to run to check health
—health-cmd
Time between running the check (ms|s|m|h) (default 0s)
—health-interval
Consecutive failures needed to report unhealthy
—health-retries
Time between running the check during the start period (ms|s|m|h) (default 0s)
—health-start-interval
Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
—health-start-period
Maximum time to allow one check to run (ms|s|m|h) (default 0s)
—health-timeout
Print usage
—help
Container host name
-h, —hostname
Run an init inside the container that forwards signals and reaps processes
—init
Keep STDIN open even if not attached
-i, —interactive
Maximum IO bandwidth limit for the system drive (Windows only)
—io-maxbandwidth
Maximum IOps limit for the system drive (Windows only)
—io-maxiops
IPv4 address (eg, 172.30.100.104)
—ip
IPv6 address (eg, 2001:db8::33)
—ip6
IPC mode to use
—ipc
Container isolation technology
—isolation
Kernel memory limit
—kernel-memory
Set meta data on a container
-l, —label
Read in a line delimited file of labels
—label-file
Add link to another container
—link
Container IPv4/IPv6 link-local addresses
—link-local-ip
Logging driver for the container
—log-driver
Log driver options
—log-opt
Container MAC address (eg, 92:d0:c6:0a:29:33)
—mac-address
Memory limit
-m, —memory
Memory soft limit
—memory-reservation
Swap limit equal to memory plus swap: ‘-1’ to enable unlimited swap
—memory-swap
Tune container memory swappiness (0 to 100)
—memory-swappiness
Attach a filesystem mount to the container
—mount
Assign a name to the container
—name
Connect a container to a network
—network
Add network-scoped alias for the container
—network-alias
Disable any container-specific HEALTHCHECK
—no-healthcheck
Disable OOM Killer
—oom-kill-disable
Tune host’s OOM preferences (-1000 to 1000)
—oom-score-adj
PID namespace to use
—pid
Tune container pids limit (set -1 for unlimited)
—pids-limit
Set platform if server is multi-platform capable
—platform
Give extended privileges to this container
—privileged
Publish a container’s port(s) to the host
-p, —publish
Publish all exposed ports to random ports
-P, —publish-all
Pull image before running (always, missing, never)
—pull
Suppress the pull output
-q, —quiet
Mount the container’s root filesystem as read only
—read-only
Restart policy to apply when a container exits
—restart
Automatically remove the container and its associated anonymous volumes when it exits
—rm
Runtime to use for this container
—runtime
Security options
—security-opt
Size of /dev/shm
—shm-size
Proxy received signals to the process
—sig-proxy
Signal to stop the container
—stop-signal
Timeout (in seconds) to stop a container
—stop-timeout
Storage driver options for the container
—storage-opt
Sysctl options
—sysctl
Mount a tmpfs directory
—tmpfs
Allocate a pseudo-TTY
-t, —tty
Ulimit options
—ulimit
Username or UID (format: <name|uid>[:<group|gid>])
-u, —user
User namespace to use
—userns
UTS namespace to use
—uts
Bind mount a volume
-v, —volume