0
0
Dockerdevops~10 mins

Docker engine and runtime - Interactive Code Practice

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

Complete the command to start the Docker service.

Docker
sudo systemctl [1] docker
Drag options to blanks, or click blank then click option'
Arestart
Bstart
Cstop
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' instead of 'start' stops the service.
Using 'status' only shows the service status but does not start it.
2fill in blank
medium

Complete the command to check the Docker engine version.

Docker
docker [1] version
Drag options to blanks, or click blank then click option'
Arun
Binfo
Cversion
Dps
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker info' shows system info but not just the version.
Using 'docker ps' lists running containers, not version.
3fill in blank
hard

Fix the error in the command to run a container interactively.

Docker
docker run -[1] ubuntu /bin/bash
Drag options to blanks, or click blank then click option'
Av
Bd
Cp
Di
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-d' runs the container detached (in background).
Using '-p' is for port mapping, not interactive mode.
4fill in blank
hard

Fill both blanks to list all Docker containers including stopped ones.

Docker
docker [1] [2]
Drag options to blanks, or click blank then click option'
Aps
B-a
C-l
Dimages
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker images' lists images, not containers.
Using '-l' shows only the last created container.
5fill in blank
hard

Fill all three blanks to build a Docker image with a tag from a Dockerfile in the current directory.

Docker
docker [1] -t [2] [3]
Drag options to blanks, or click blank then click option'
Abuild
Bmyapp:latest
C.
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' instead of 'docker build' tries to run a container.
Forgetting the '.' means Docker won't know where the Dockerfile is.