0
0
Dockerdevops~10 mins

Why orchestration matters in Docker - Test Your Understanding

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

Complete the code to start a Docker container named 'webapp'.

Docker
docker run --name [1] -d nginx
Drag options to blanks, or click blank then click option'
Abackend
Bdatabase
Ccache
Dwebapp
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong container name that does not match the app.
2fill in blank
medium

Complete the command to list all running Docker containers.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Aps
Bimages
Crun
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker images' which lists images, not containers.
3fill in blank
hard

Fix the error in the Docker Compose file to define a service named 'app'.

Docker
services:
  [1]:
    image: nginx
    ports:
      - "80:80"
Drag options to blanks, or click blank then click option'
Abackend
Bcache
Capp
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong service name that does not match the app.
4fill in blank
hard

Fill both blanks to create a Docker Compose service that restarts automatically on failure.

Docker
services:
  web:
    image: nginx
    restart: [1]
    ports:
      - "[2]:80"
Drag options to blanks, or click blank then click option'
Aon-failure
Balways
C8080
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'always' restart policy when only 'on-failure' is requested.
Swapping port numbers incorrectly.
5fill in blank
hard

Fill all three blanks to define a Docker Compose service with environment variables and volume mapping.

Docker
services:
  db:
    image: postgres
    environment:
      - POSTGRES_USER=[1]
      - POSTGRES_PASSWORD=[2]
    volumes:
      - [3]:/var/lib/postgresql/data
Drag options to blanks, or click blank then click option'
Aadmin
Bsecret123
C./dbdata
D/data
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect environment variable names.
Swapping volume paths.