0
0
Dockerdevops~10 mins

Why Docker improves development workflow - 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 using the official nginx image.

Docker
docker run --name mynginx [1]
Drag options to blanks, or click blank then click option'
Anginx
Bubuntu
Cmysql
Dnode
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated images like ubuntu or mysql.
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
Brun
Cbuild
Dimages
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker images' which lists images, not containers.
3fill in blank
hard

Fix the error in the Dockerfile to copy files into the container.

Docker
FROM alpine
COPY [1] /app/
Drag options to blanks, or click blank then click option'
A/app
Bapp/
Capp
D./app
Attempts:
3 left
💡 Hint
Common Mistakes
Adding a trailing slash to the source path.
4fill in blank
hard

Fill both blanks to run a container in detached mode and map port 8080 to 80.

Docker
docker run [1] -p [2]:80 nginx
Drag options to blanks, or click blank then click option'
A-d
B8080
C80
D--rm
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping port numbers or missing detached flag.
5fill in blank
hard

Fill all three blanks to build a Docker image named 'myapp' from the current directory with no cache.

Docker
docker build [1] -t [2] [3]
Drag options to blanks, or click blank then click option'
A--no-cache
Bmyapp
C.
D-f Dockerfile
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting build context or misplacing flags.