Skip to content

Commit 95a277b

Browse files
committed
Add new questions for Orchestration and Image Creation domains
Orchestration (+38 questions): - service_update_rollback.yaml: update/rollback strategies (10) - node_availability.yaml: drain/active/pause states (8) - swarm_autolock.yaml: autolock feature (6) - secrets_and_configs.yaml: Docker secrets and configs (8) - service_healthcheck.yaml: health checks in Swarm (6) Image Creation (+32 questions): - healthcheck_instruction.yaml: HEALTHCHECK in Dockerfile (6) - buildkit_buildx.yaml: BuildKit and buildx (6) - cmd_vs_entrypoint.yaml: CMD vs ENTRYPOINT deep dive (8) - arg_vs_env.yaml: ARG vs ENV instructions (6) - build_cache.yaml: build cache optimization (6)
1 parent 212d635 commit 95a277b

File tree

11 files changed

+640
-0
lines changed

11 files changed

+640
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ The goal is to help candidates:
4141
* [Describe how a Dockerized application communicates with legacy systems.](data/1_Orchestration/legacy_communication.yaml)
4242
* [Describe how to deploy containerized workloads as Kubernetes pods and deployments.](data/1_Orchestration/k8s_pods_deployments.yaml)
4343
* [Describe how to provide configuration to Kubernetes pods using configMaps and secrets.](data/1_Orchestration/k8s_configmap_secret.yaml)
44+
* [Describe service update and rollback strategies.](data/1_Orchestration/service_update_rollback.yaml)
45+
* [Describe node availability (drain, active, pause).](data/1_Orchestration/node_availability.yaml)
46+
* [Describe the Swarm autolock feature.](data/1_Orchestration/swarm_autolock.yaml)
47+
* [Describe Docker secrets and configs in Swarm.](data/1_Orchestration/secrets_and_configs.yaml)
48+
* [Describe service health checks in Swarm.](data/1_Orchestration/service_healthcheck.yaml)
4449

4550
### Domain 2: Image Creation, Management, and Registry (20% of exam)
4651

@@ -61,6 +66,11 @@ The goal is to help candidates:
6166
* [Push an image to a registry.](data/2_Image_creation_management_registry/push_an_image_to_a_registry.yaml)
6267
* [Sign an image in a registry.](data/2_Image_creation_management_registry/sign_an_image_in_a_registry.yaml)
6368
* [Pull and delete images from a registry.](data/2_Image_creation_management_registry/pull_delete_images_registry.yaml)
69+
* [Describe the HEALTHCHECK instruction in a Dockerfile.](data/2_Image_creation_management_registry/healthcheck_instruction.yaml)
70+
* [Describe BuildKit and docker buildx.](data/2_Image_creation_management_registry/buildkit_buildx.yaml)
71+
* [Compare CMD vs ENTRYPOINT instructions.](data/2_Image_creation_management_registry/cmd_vs_entrypoint.yaml)
72+
* [Compare ARG vs ENV instructions.](data/2_Image_creation_management_registry/arg_vs_env.yaml)
73+
* [Describe Docker build cache optimization.](data/2_Image_creation_management_registry/build_cache.yaml)
6474

6575
### Domain 3: Installation and Configuration (15% of exam)
6676

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
questions:
2+
- uuid: 47a3c1d4-5b2f-4e8a-d0c6-1f7b4a9e2d05
3+
question: Which command sets a Swarm node to drain availability?
4+
answers:
5+
- { value: 'docker node update --availability drain <node>', correct: true }
6+
- { value: 'docker node drain <node>', correct: false }
7+
- { value: 'docker swarm update --drain <node>', correct: false }
8+
- { value: 'docker node set --status drain <node>', correct: false }
9+
help: 'https://docs.docker.com/reference/cli/docker/node/update/'
10+
11+
- uuid: 58b4d2e5-6c3a-4f9b-e1d7-2a8c5b0f3e16
12+
question: What happens to running tasks on a node when its availability is set to drain?
13+
answers:
14+
- { value: 'Tasks are paused until the node is set back to active', correct: false }
15+
- { value: 'Tasks are stopped and rescheduled on other available nodes', correct: true }
16+
- { value: 'Tasks continue running but no new tasks are assigned', correct: false }
17+
- { value: 'Tasks are deleted permanently', correct: false }
18+
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'
19+
20+
- uuid: 69c5e3f6-7d4b-4a0c-f2e8-3b9d6c1a4f27
21+
question: What are the three possible availability states for a Docker Swarm node?
22+
answers:
23+
- { value: 'active, pause, drain', correct: true }
24+
- { value: 'running, stopped, paused', correct: false }
25+
- { value: 'active, inactive, drain', correct: false }
26+
- { value: 'ready, standby, offline', correct: false }
27+
help: 'https://docs.docker.com/reference/cli/docker/node/update/'
28+
29+
- uuid: 70d6f4a7-8e5c-4b1d-a3f9-4c0e7d2b5a38
30+
question: What is the effect of setting a node to "pause" availability?
31+
answers:
32+
- { value: 'All running tasks are stopped immediately', correct: false }
33+
- { value: 'The node leaves the Swarm cluster', correct: false }
34+
- { value: 'The node does not receive new tasks but existing tasks continue running', correct: true }
35+
- { value: 'The node becomes a manager node', correct: false }
36+
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'
37+
38+
- uuid: 81e7a5b8-9f6d-4c2e-b4a0-5d1f8e3c6b49
39+
question: Can a manager node be drained in Docker Swarm?
40+
answers:
41+
- { value: 'No, manager nodes cannot be drained', correct: false }
42+
- { value: 'Yes, but it loses its manager status', correct: false }
43+
- { value: 'Yes, it stops running tasks but retains its manager role', correct: true }
44+
- { value: 'Yes, but only if there is a single manager in the cluster', correct: false }
45+
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'
46+
47+
- uuid: 92f8b6c9-0a7e-4d3f-c5b1-6e2a9f4d7c50
48+
question: After draining a node and performing maintenance, which command makes the node available for tasks again?
49+
answers:
50+
- { value: 'docker node update --availability active <node>', correct: true }
51+
- { value: 'docker node activate <node>', correct: false }
52+
- { value: 'docker node update --status ready <node>', correct: false }
53+
- { value: 'docker node resume <node>', correct: false }
54+
help: 'https://docs.docker.com/reference/cli/docker/node/update/'
55+
56+
- uuid: a3a9c7d0-1b8f-4e4a-d6c2-7f3b0a5e8d61
57+
question: When a drained node is set back to active, do previously running tasks automatically move back to it?
58+
answers:
59+
- { value: 'Yes, all tasks return to their original node', correct: false }
60+
- { value: 'Yes, but only global service tasks return', correct: false }
61+
- { value: 'No, existing tasks stay where they are; the node only receives new or rebalanced tasks', correct: true }
62+
- { value: 'No, the node must rejoin the Swarm to receive tasks', correct: false }
63+
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'
64+
65+
- uuid: b4b0d8e1-2c9a-4f5b-e7d3-8a4c1b6f9e72
66+
question: Which command can you use to verify the current availability status of all Swarm nodes?
67+
answers:
68+
- { value: 'docker swarm status', correct: false }
69+
- { value: 'docker node ls', correct: true }
70+
- { value: 'docker info --nodes', correct: false }
71+
- { value: 'docker service ps --all', correct: false }
72+
help: 'https://docs.docker.com/reference/cli/docker/node/ls/'
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
questions:
2+
- uuid: c1c7e5f8-9d6a-4a2b-f4e0-5b1d8c3a6f49
3+
question: Which command creates a Docker secret from a file?
4+
answers:
5+
- { value: 'docker secret add my_secret ./secret.txt', correct: false }
6+
- { value: 'docker secret create my_secret ./secret.txt', correct: true }
7+
- { value: 'docker service secret --add my_secret ./secret.txt', correct: false }
8+
- { value: 'docker config create --secret my_secret ./secret.txt', correct: false }
9+
help: 'https://docs.docker.com/reference/cli/docker/secret/create/'
10+
11+
- uuid: d2d8f6a9-0e7b-4b3c-a5f1-6c2e9d4b7a50
12+
question: Where are Docker secrets mounted inside a service container by default?
13+
answers:
14+
- { value: '/etc/secrets/<secret_name>', correct: false }
15+
- { value: '/var/run/secrets/<secret_name>', correct: false }
16+
- { value: '/run/secrets/<secret_name>', correct: true }
17+
- { value: '/tmp/secrets/<secret_name>', correct: false }
18+
help: 'https://docs.docker.com/engine/swarm/secrets/#how-docker-manages-secrets'
19+
20+
- uuid: e3e9a7b0-1f8c-4c4d-b6a2-7d3f0e5c8b61
21+
question: Which command creates a Docker config from a file?
22+
answers:
23+
- { value: 'docker config create my_config ./config.txt', correct: true }
24+
- { value: 'docker config add my_config ./config.txt', correct: false }
25+
- { value: 'docker service config --add my_config ./config.txt', correct: false }
26+
- { value: 'docker create config my_config ./config.txt', correct: false }
27+
help: 'https://docs.docker.com/reference/cli/docker/config/create/'
28+
29+
- uuid: f4f0b8c1-2a9d-4d5e-c7b3-8e4a1f6d9c72
30+
question: What is a key difference between Docker secrets and Docker configs?
31+
answers:
32+
- { value: 'Secrets are stored in Raft log encrypted; configs are not encrypted at rest', correct: true }
33+
- { value: 'Configs can only be used with global services', correct: false }
34+
- { value: 'Secrets are mounted as volumes; configs are set as environment variables', correct: false }
35+
- { value: 'Configs are limited to 100KB; secrets have no size limit', correct: false }
36+
help: 'https://docs.docker.com/engine/swarm/configs/'
37+
38+
- uuid: a5a1c9d2-3b0e-4e6f-d8c4-9f5b2a7e0d83
39+
question: How do you grant a running service access to an existing secret?
40+
answers:
41+
- { value: 'docker secret attach my_secret myservice', correct: false }
42+
- { value: 'docker service update --secret-add my_secret myservice', correct: true }
43+
- { value: 'docker service update --mount secret=my_secret myservice', correct: false }
44+
- { value: 'docker secret grant my_secret myservice', correct: false }
45+
help: 'https://docs.docker.com/reference/cli/docker/service/update/'
46+
47+
- uuid: b6b2d0e3-4c1f-4f7a-e9d5-0a6c3b8f1e94
48+
question: Can you update or change the content of an existing Docker secret?
49+
answers:
50+
- { value: 'Yes, using docker secret update', correct: false }
51+
- { value: 'Yes, by overwriting it with docker secret create --force', correct: false }
52+
- { value: 'No, secrets are immutable; you must create a new secret and update the service', correct: true }
53+
- { value: 'Yes, but only if no service is using it', correct: false }
54+
help: 'https://docs.docker.com/engine/swarm/secrets/#example-rotate-a-secret'
55+
56+
- uuid: c7c3e1f4-5d2a-4a8b-f0e6-1b7d4c9a2f05
57+
question: Where are Docker configs mounted inside a container by default?
58+
answers:
59+
- { value: '/run/configs/<config_name>', correct: false }
60+
- { value: '/<config_name>', correct: true }
61+
- { value: '/etc/configs/<config_name>', correct: false }
62+
- { value: '/var/config/<config_name>', correct: false }
63+
help: 'https://docs.docker.com/engine/swarm/configs/#how-docker-manages-configs'
64+
65+
- uuid: d8d4f2a5-6e3b-4b9c-a1f7-2c8e5d0a3b16
66+
question: Which Docker feature requires Swarm mode to function?
67+
answers:
68+
- { value: 'Volumes', correct: false }
69+
- { value: 'Bridge networks', correct: false }
70+
- { value: 'Secrets', correct: true }
71+
- { value: 'Bind mounts', correct: false }
72+
help: 'https://docs.docker.com/engine/swarm/secrets/'
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
questions:
2+
- uuid: e9e5a3b6-7f4d-4c0e-b2a8-3d9f6e1b4c27
3+
question: Which flag defines a health check command when creating a Docker Swarm service?
4+
answers:
5+
- { value: '--health-test', correct: false }
6+
- { value: '--healthcheck', correct: false }
7+
- { value: '--health-cmd', correct: true }
8+
- { value: '--check-health', correct: false }
9+
help: 'https://docs.docker.com/reference/cli/docker/service/create/#health-cmd'
10+
11+
- uuid: f0f6b4c7-8a5e-4d1f-c3b9-4e0a7f2c5d38
12+
question: What are the three possible health states of a container with a health check configured?
13+
answers:
14+
- { value: 'healthy, unhealthy, unknown', correct: false }
15+
- { value: 'starting, healthy, unhealthy', correct: true }
16+
- { value: 'running, stopped, failed', correct: false }
17+
- { value: 'passing, warning, critical', correct: false }
18+
help: 'https://docs.docker.com/reference/dockerfile/#healthcheck'
19+
20+
- uuid: a1a7c5d8-9b6f-4e2a-d4c0-5f1b8a3d6e49
21+
question: What does the --health-retries flag specify?
22+
answers:
23+
- { value: 'The number of times to retry a failed service deployment', correct: false }
24+
- { value: 'The number of consecutive health check failures needed to report unhealthy', correct: true }
25+
- { value: 'The number of health checks to run in parallel', correct: false }
26+
- { value: 'The number of nodes to check health on', correct: false }
27+
help: 'https://docs.docker.com/reference/cli/docker/service/create/#health-retries'
28+
29+
- uuid: b2b8d6e9-0c7a-4f3b-e5d1-6a2c9b4e7f50
30+
question: What does the --health-start-period flag control?
31+
answers:
32+
- { value: 'The time to wait before the first health check runs', correct: false }
33+
- { value: 'The grace period during which health check failures are not counted toward the maximum retries', correct: true }
34+
- { value: 'The interval between health checks at service startup', correct: false }
35+
- { value: 'The maximum time allowed for the service to start', correct: false }
36+
help: 'https://docs.docker.com/reference/cli/docker/service/create/#health-start-period'
37+
38+
- uuid: c3c9e7f0-1d8b-4a4c-f6e2-7b3d0c5f8a61
39+
question: What happens to a Swarm service task when its container is reported as unhealthy?
40+
answers:
41+
- { value: 'The task is paused and an alert is sent', correct: false }
42+
- { value: 'Nothing happens; the task continues running', correct: false }
43+
- { value: 'The task is stopped and a new task is scheduled to replace it', correct: true }
44+
- { value: 'The task is moved to a different node', correct: false }
45+
help: 'https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/'
46+
47+
- uuid: d4d0f8a1-2e9c-4b5d-a7f3-8c4e1d6a9b72
48+
question: What is the default interval between health checks if --health-interval is not specified?
49+
answers:
50+
- { value: '10s', correct: false }
51+
- { value: '30s', correct: true }
52+
- { value: '1m', correct: false }
53+
- { value: '5s', correct: false }
54+
help: 'https://docs.docker.com/reference/dockerfile/#healthcheck'
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
questions:
2+
- uuid: a3c7e1b4-9f2d-4e8a-b5c6-1d3f7a9e2b04
3+
question: Which command updates the image of an existing Docker Swarm service named "web" to nginx:1.25?
4+
answers:
5+
- { value: 'docker service update --image nginx:1.25 web', correct: true }
6+
- { value: 'docker service create --image nginx:1.25 web', correct: false }
7+
- { value: 'docker service scale --image nginx:1.25 web', correct: false }
8+
- { value: 'docker update --image nginx:1.25 web', correct: false }
9+
help: 'https://docs.docker.com/reference/cli/docker/service/update/'
10+
11+
- uuid: b8d4f2a5-6e3c-4b9d-a1f7-2c8e5d0a3b16
12+
question: What does the --update-delay flag control during a service update?
13+
answers:
14+
- { value: 'The time to wait before starting the update', correct: false }
15+
- { value: 'The time to wait between updating each group of tasks', correct: true }
16+
- { value: 'The maximum time a single task update can take', correct: false }
17+
- { value: 'The time to wait before rolling back on failure', correct: false }
18+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
19+
20+
- uuid: c9e5a3b6-7f4d-4c0e-b2a8-3d9f6e1b4c27
21+
question: What does --update-parallelism 3 mean when updating a service?
22+
answers:
23+
- { value: 'Three services are updated at the same time', correct: false }
24+
- { value: 'The update runs on three nodes simultaneously', correct: false }
25+
- { value: 'Three tasks are updated at a time during the rolling update', correct: true }
26+
- { value: 'The update retries three times on failure', correct: false }
27+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
28+
29+
- uuid: d0f6b4c7-8a5e-4d1f-c3b9-4e0a7f2c5d38
30+
question: What is the default value for --update-failure-action in Docker Swarm?
31+
answers:
32+
- { value: 'rollback', correct: false }
33+
- { value: 'continue', correct: false }
34+
- { value: 'pause', correct: true }
35+
- { value: 'stop', correct: false }
36+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
37+
38+
- uuid: e1a7c5d8-9b6f-4e2a-d4c0-5f1b8a3d6e49
39+
question: Which command manually triggers a rollback of a Docker Swarm service?
40+
answers:
41+
- { value: 'docker service revert myservice', correct: false }
42+
- { value: 'docker service update --undo myservice', correct: false }
43+
- { value: 'docker service rollback myservice', correct: true }
44+
- { value: 'docker service update --previous myservice', correct: false }
45+
help: 'https://docs.docker.com/reference/cli/docker/service/rollback/'
46+
47+
- uuid: f2b8d6e9-0c7a-4f3b-e5d1-6a2c9b4e7f50
48+
question: What does the --update-order start-first option do during a service update?
49+
answers:
50+
- { value: 'It starts the new task before stopping the old task', correct: true }
51+
- { value: 'It stops the old task before starting the new task', correct: false }
52+
- { value: 'It starts the update on the first node in the cluster', correct: false }
53+
- { value: 'It prioritizes manager nodes during the update', correct: false }
54+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
55+
56+
- uuid: 03c9e7f0-1d8b-4a4c-f6e2-7b3d0c5f8a61
57+
question: What is the default update order for Docker Swarm service updates?
58+
answers:
59+
- { value: 'start-first', correct: false }
60+
- { value: 'stop-first', correct: true }
61+
- { value: 'parallel', correct: false }
62+
- { value: 'round-robin', correct: false }
63+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
64+
65+
- uuid: 14d0f8a1-2e9c-4b5d-a7f3-8c4e1d6a9b72
66+
question: Which flag sets the maximum time a single task has to update before it is considered failed?
67+
answers:
68+
- { value: '--update-delay', correct: false }
69+
- { value: '--update-timeout', correct: false }
70+
- { value: '--update-monitor', correct: true }
71+
- { value: '--update-max-time', correct: false }
72+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
73+
74+
- uuid: 25e1a9b2-3f0d-4c6e-b8a4-9d5f2e7b0c83
75+
question: How do you configure a service so that it automatically rolls back if an update fails?
76+
answers:
77+
- { value: '--update-failure-action rollback', correct: true }
78+
- { value: '--rollback-on-failure true', correct: false }
79+
- { value: '--update-auto-rollback', correct: false }
80+
- { value: '--update-failure-action revert', correct: false }
81+
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'
82+
83+
- uuid: 36f2b0c3-4a1e-4d7f-c9b5-0e6a3f8c1d94
84+
question: Which flag configures the delay between task rollbacks during an automatic rollback?
85+
answers:
86+
- { value: '--update-delay', correct: false }
87+
- { value: '--rollback-delay', correct: true }
88+
- { value: '--rollback-interval', correct: false }
89+
- { value: '--rollback-wait', correct: false }
90+
help: 'https://docs.docker.com/engine/swarm/services/#roll-back-to-the-previous-version-of-a-service'

0 commit comments

Comments
 (0)