-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinterpret_output_docker_inspect_command.yaml
More file actions
180 lines (161 loc) · 9.77 KB
/
interpret_output_docker_inspect_command.yaml
File metadata and controls
180 lines (161 loc) · 9.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
questions:
- uuid: 36fdf2a4-5d6f-4c63-b12e-9ff54b84f021
question: What information can be retrieved using the command “docker inspect <container>”?
answers:
- { value: 'A summary of Docker system resource usage', correct: false }
- { value: 'Container logs in real time', correct: false }
- { value: 'All running containers grouped by image', correct: false }
- { value: 'Low-level details such as network settings, volumes, environment variables, and process ID', correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/
- uuid: 9e05fa39-6be3-4b4e-a054-3cc2344e1f9b
question: What type of data is returned by “docker inspect” by default?
answers:
- { value: 'Binary-encoded runtime state', correct: false }
- { value: 'Raw JSON objects describing the container or image', correct: true }
- { value: 'Formatted logs with timestamps', correct: false }
- { value: 'Human-readable summary tables', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/
- uuid: 5f2b3e77-b221-4cb8-a405-3aeb8a947d30
question: Which docker inspect property shows whether a container has mounted volumes?
answers:
- { value: '.Mounts', correct: true }
- { value: '.Binds', correct: false }
- { value: '.Volumes', correct: false }
- { value: '.Layers', correct: false }
help: https://docs.docker.com/engine/api/v1.43/#operation/ContainerInspect
- uuid: 49de41e1-f72d-46ee-bfe7-6e448f6f827d
question: Which field in “docker inspect” output tells whether a container was started with a TTY allocated?
answers:
- { value: '.State.Terminal', correct: false }
- { value: '.HostConfig.TtyEnabled', correct: false }
- { value: '.Flags.tty', correct: false }
- { value: '.Config.Tty', correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/
- uuid: 5ac5561d-0802-4fc2-88d7-bec37cb8a4df
question: How can you filter `docker inspect` output to only display the IP address of a container?
answers:
- { value: 'docker inspect --ip-only <container>', correct: false }
- { value: 'docker info --network <container>', correct: false }
- { value: 'docker logs --network-info <container>', correct: false }
- { value: "docker inspect -f '{{ .NetworkSettings.IPAddress }}' <container>", correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/
- uuid: 5e7f3841-bd3f-4e3e-b63b-73f4b7b9482e
question: How can you display the container's MAC address using 'docker inspect'?
answers:
- { value: 'Using the format `{{.MAC}}`', correct: false }
- { value: 'Using the format `{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}`', correct: true }
- { value: 'Using the format `{{.Network.Mac}}`', correct: false }
- { value: 'docker inspect --mac', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#get-an-instances-mac-address
- uuid: 292be32d-6601-4b64-889a-78ed87a6d593
question: Which field reveals the container's log file location?
answers:
- { value: 'LogFile', correct: false }
- { value: 'LogPath', correct: true }
- { value: 'ContainerLog', correct: false }
- { value: 'LoggingPath', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#get-an-instances-log-path
- uuid: 71ae206c-7b39-4b37-97f4-b597310d0b2c
question: How do you retrieve the image name used by a container?
answers:
- { value: 'Using the field .Config.Image', correct: true }
- { value: 'From .Metadata.Image', correct: false }
- { value: 'Using the field .Image.Name', correct: false }
- { value: 'With `docker image inspect`', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#get-an-instances-image-name
- uuid: 9db23e15-e12d-49f8-a429-dfcbd9f9b8f5
question: What does the 'SizeRw' field represent in a container's inspect output?
answers:
- { value: 'The total size of all image layers', correct: false }
- { value: 'The root filesystem size', correct: false }
- { value: 'The memory consumed by the container', correct: false }
- { value: 'The size of the writable layer compared to the image', correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/#inspect-the-size-of-a-container
- uuid: 6afcb090-45c7-45ef-9817-f1049d6536b0
question: Which command shows volume details specifically?
answers:
- { value: 'docker volume inspect --details', correct: false }
- { value: 'docker info --volumes', correct: false }
- { value: 'docker inspect myvolume --only-volume', correct: false }
- { value: 'docker inspect --type=volume myvolume', correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/#specify-target-type---type
- uuid: 6ad0d3f8-0834-4011-a942-9be3d30fc17a
question: What is the result of using the '--type' flag incorrectly?
answers:
- { value: 'It crashes the Docker daemon', correct: false }
- { value: 'It lists only containers', correct: false }
- { value: 'The command may return ambiguous or incorrect results', correct: true }
- { value: 'It disables network inspection', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#specify-target-type---type
- uuid: d50e1c3d-1f36-4b7b-a8ae-94f00ef1168f
question: What happens if you inspect multiple objects at once?
answers:
- { value: 'Only container types are shown', correct: false }
- { value: 'Only the first object is returned', correct: false }
- { value: 'The output is an array of results', correct: true }
- { value: 'Docker throws an error', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/
- uuid: 3f0b5099-9cc6-4144-bb5f-82064c5e373b
question: What does 'SizeRootFs' represent in inspect output?
answers:
- { value: 'Total size of the container’s filesystem', correct: true }
- { value: 'The combined memory and disk usage', correct: false }
- { value: 'Only the changed files', correct: false }
- { value: 'The base image size', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#inspect-the-size-of-a-container
- uuid: 7827e2be-77e1-4380-a173-9f64dba7c5d9
question: How do you list all port bindings using 'docker inspect'?
answers:
- { value: 'With `--list-ports`', correct: false }
- { value: 'Using `{{.PortMap}}`', correct: false }
- { value: 'Via docker network inspect', correct: false }
- { value: 'Using `{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}`', correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/#list-all-port-bindings
- uuid: d7c4dcd3-2542-4e5e-a0cf-01fd640fa73f
question: Can 'docker inspect' be used on stopped containers?
answers:
- { value: 'No, only running containers are supported', correct: false }
- { value: 'It returns null data for stopped containers', correct: false }
- { value: 'Only images can be inspected', correct: false }
- { value: 'Yes, it works on both running and stopped containers', correct: true }
help: https://docs.docker.com/reference/cli/docker/inspect/
- uuid: b0e1a41f-b260-4090-91e4-9df6f1909c83
question: What does the --size flag add to the output of 'docker inspect'?
answers:
- { value: 'It enables verbose logging output', correct: false }
- { value: 'It includes SizeRootFs and SizeRw fields for containers', correct: true }
- { value: 'It shows the image size in MB', correct: false }
- { value: 'It adds memory and CPU usage statistics', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#inspect-the-size-of-a-container
- uuid: f08b0930-7c4f-43a6-85b0-312ef6b7e8cc
question: Which inspect field tells you if a container is currently running?
answers:
- { value: '.State.Running', correct: true }
- { value: '.Status', correct: false }
- { value: '.HostConfig.State', correct: false }
- { value: '.Active', correct: false }
help: https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect
- uuid: 11a5b2f3-fd1a-43d5-9a1e-d9c8a6098f14
question: What does an ExitCode of 137 typically indicate in 'docker inspect'?
answers:
- { value: 'The container was paused', correct: false }
- { value: 'The container was killed by the system (e.g., out-of-memory)', correct: true }
- { value: 'The container exited normally', correct: false }
- { value: 'The container is still running', correct: false }
help: https://docs.docker.com/engine/reference/run/#exit-status
- uuid: e01bb0a4-3d67-4d6c-bb71-18981db6f3a5
question: What is the effect of using '{{json .Config}}' with docker inspect --format?
answers:
- { value: 'It disables structured output', correct: false }
- { value: 'It renders the Config object in JSON format', correct: true }
- { value: 'It converts all fields to base64', correct: false }
- { value: 'It filters only the container ID', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#get-a-subsection-in-json-format
- uuid: 4b758c3e-2b67-4fa4-8db4-8e2e45c220d7
question: Why would you use the --type flag with docker inspect?
answers:
- { value: 'To limit the inspect result to container IDs only', correct: false }
- { value: 'To disambiguate between objects with the same name', correct: true }
- { value: 'To trigger recursive inspection', correct: false }
- { value: 'To enable secure inspect mode', correct: false }
help: https://docs.docker.com/reference/cli/docker/inspect/#specify-target-type---type