docker flags

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/102

flashcard set

Earn XP

Description and Tags

Flashcards for docker run options

103 Terms

1
New cards

Add a custom host-to-IP mapping (host:ip)

—add-host

2
New cards

Add an annotation to the container (passed through to the OCI runtime)

—annotation

3
New cards

Attach to STDIN, STDOUT or STDERR

-a, —attach

4
New cards

Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)

—blkio-weight

5
New cards

Block IO weight (relative device weight)

—blkio-weight-device

6
New cards

Add Linux capabilities

—cap-add

7
New cards

Drop Linux capabilities

—cap-drop

8
New cards

Optional parent cgroup for the container

—cgroup-parent

9
New cards

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

10
New cards

Write the container ID to the file

—cidfile

11
New cards

CPU count (Windows only)

—cpu-count

12
New cards

CPU percent (Windows only)

—cpu-percent

13
New cards

Limit CPU CFS (Completely Fair Scheduler) period

—cpu-period

14
New cards

Limit CPU CFS (Completely Fair Scheduler) quota

—cpu-quota

15
New cards

Limit CPU real-time period in microseconds

—cpu-rt-period

16
New cards

Limit CPU real-time runtime in microseconds

—cput-rt-runtime

17
New cards

CPU shares (relative weight)

-c, —cpu-shares

18
New cards

Number of CPUs

—cpus

19
New cards

CPUs in which to allow execution (0-3, 0, 1)

—cpuset-cpus

20
New cards

MEMs in which to allow execution (0-3, 0, 1)

—cpuset-mems

21
New cards

Run container in background and print container ID

-d, —detach

22
New cards

Override the key sequence for detaching a container

—detach-keys

23
New cards

Add a host device to the container

—device

24
New cards

Add a rule to the cgroup allowed devices list

—device-cgroup-rule

25
New cards

Limit read rate (bytes per second) from a device

—device-read-bps

26
New cards

Limit read rate (IO per second) from a device

—device-read-iops

27
New cards

Limit write rate (bytes per second) to a device

—device-write-bps

28
New cards

Limit write rate (IO per second) to a device

—device-write-iops

29
New cards

Skip image verification

—disable-content-trust true

30
New cards

Set custom DNS servers

—dns

31
New cards

Set DNS options

—dns-option

32
New cards

Set custom DNS search domains

—dns-search

33
New cards

Container NIS domain name

—domainname

34
New cards

Overwrite the default ENTRYPOINT of the image

—entrypoint

35
New cards

Set environment variables

-e, —env

36
New cards

Read in a file of environment variables

—env-file

37
New cards

Expose a port or range of ports

—expose

38
New cards

GPU devices to add to the container (‘all’ to pass all GPUs)

—gpus

39
New cards

Add additional groups to join

—group-add

40
New cards

Command to run to check health

—health-cmd

41
New cards

Time between running the check (ms|s|m|h) (default 0s)

—health-interval

42
New cards

Consecutive failures needed to report unhealthy

—health-retries

43
New cards

Time between running the check during the start period (ms|s|m|h) (default 0s)

—health-start-interval

44
New cards

Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)

—health-start-period

45
New cards

Maximum time to allow one check to run (ms|s|m|h) (default 0s)

—health-timeout

46
New cards

Print usage

—help

47
New cards

Container host name

-h, —hostname

48
New cards

Run an init inside the container that forwards signals and reaps processes

—init

49
New cards

Keep STDIN open even if not attached

-i, —interactive

50
New cards

Maximum IO bandwidth limit for the system drive (Windows only)

—io-maxbandwidth

51
New cards

Maximum IOps limit for the system drive (Windows only)

—io-maxiops

52
New cards

IPv4 address (eg, 172.30.100.104)

—ip

53
New cards

IPv6 address (eg, 2001:db8::33)

—ip6

54
New cards

IPC mode to use

—ipc

55
New cards

Container isolation technology

—isolation

56
New cards

Kernel memory limit

—kernel-memory

57
New cards

Set meta data on a container

-l, —label

58
New cards

Read in a line delimited file of labels

—label-file

59
New cards

Add link to another container

—link

60
New cards

Container IPv4/IPv6 link-local addresses

—link-local-ip

61
New cards

Logging driver for the container

—log-driver

62
New cards

Log driver options

—log-opt

63
New cards

Container MAC address (eg, 92:d0:c6:0a:29:33)

—mac-address

64
New cards

Memory limit

-m, —memory

65
New cards

Memory soft limit

—memory-reservation

66
New cards

Swap limit equal to memory plus swap: ‘-1’ to enable unlimited swap

—memory-swap

67
New cards

Tune container memory swappiness (0 to 100)

—memory-swappiness

68
New cards

Attach a filesystem mount to the container

—mount

69
New cards

Assign a name to the container

—name

70
New cards

Connect a container to a network

—network

71
New cards

Add network-scoped alias for the container

—network-alias

72
New cards

Disable any container-specific HEALTHCHECK

—no-healthcheck

73
New cards

Disable OOM Killer

—oom-kill-disable

74
New cards

Tune host’s OOM preferences (-1000 to 1000)

—oom-score-adj

75
New cards

PID namespace to use

—pid

76
New cards

Tune container pids limit (set -1 for unlimited)

—pids-limit

77
New cards

Set platform if server is multi-platform capable

—platform

78
New cards

Give extended privileges to this container

—privileged

79
New cards

Publish a container’s port(s) to the host

-p, —publish

80
New cards

Publish all exposed ports to random ports

-P, —publish-all

81
New cards

Pull image before running (always, missing, never)

—pull

82
New cards

Suppress the pull output

-q, —quiet

83
New cards

Mount the container’s root filesystem as read only

—read-only

84
New cards

Restart policy to apply when a container exits

—restart

85
New cards

Automatically remove the container and its associated anonymous volumes when it exits

—rm

86
New cards

Runtime to use for this container

—runtime

87
New cards

Security options

—security-opt

88
New cards

Size of /dev/shm

—shm-size

89
New cards

Proxy received signals to the process

—sig-proxy

90
New cards

Signal to stop the container

—stop-signal

91
New cards

Timeout (in seconds) to stop a container

—stop-timeout

92
New cards

Storage driver options for the container

—storage-opt

93
New cards

Sysctl options

—sysctl

94
New cards

Mount a tmpfs directory

—tmpfs

95
New cards

Allocate a pseudo-TTY

-t, —tty

96
New cards

Ulimit options

—ulimit

97
New cards

Username or UID (format: <name|uid>[:<group|gid>])

-u, —user

98
New cards

User namespace to use

—userns

99
New cards

UTS namespace to use

—uts

100
New cards

Bind mount a volume

-v, —volume