0
0
Dockerdevops~10 mins

Container orchestration in production in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to list all running Docker containers.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Aps
Brun
Cstart
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' instead of 'docker ps' to list containers.
Using 'docker start' which starts a stopped container but does not list them.
2fill in blank
medium

Complete the command to create a Docker Swarm cluster on the current machine.

Docker
docker swarm [1]
Drag options to blanks, or click blank then click option'
Ajoin
Binit
Cleave
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'join' which is for adding nodes to an existing swarm.
Using 'leave' which removes a node from a swarm.
3fill in blank
hard

Fix the error in the command to deploy a service named 'web' with 3 replicas.

Docker
docker service create --name web --replicas [1] nginx
Drag options to blanks, or click blank then click option'
A3
B-3
Ctwo
Dzero
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'two' or 'zero' instead of numbers.
Using negative numbers like '-3' which are invalid.
4fill in blank
hard

Fill both blanks to create a Docker Compose file snippet that defines a service named 'app' using the image 'myapp:latest'.

Docker
services:
  app:
    image: [1]
    [2]: 80
Drag options to blanks, or click blank then click option'
Amyapp:latest
Bports
Cvolumes
Denvironment
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'volumes' or 'environment' instead of 'ports' to expose ports.
Incorrect image name or format.
5fill in blank
hard

Fill all three blanks to write a Docker command that updates the 'web' service to use 5 replicas and the image 'nginx:stable'.

Docker
docker service update --replicas [1] --image [2] [3]
Drag options to blanks, or click blank then click option'
Aweb
Bnginx:stable
C5
Dmyapp
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of arguments.
Using wrong image or service names.