0
0
Dockerdevops~10 mins

Why images are blueprints for containers in Docker - Test Your Understanding

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

Complete the command to list all Docker images on your system.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Astart
Brun
Cbuild
Dimages
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' instead of 'docker images' to list images.
2fill in blank
medium

Complete the command to create a container from an image named 'nginx'.

Docker
docker [1] nginx
Drag options to blanks, or click blank then click option'
Arun
Bimages
Cbuild
Dpull
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker build' instead of 'docker run' to start a container.
3fill in blank
hard

Fix the error in this Dockerfile line to set the base image to Ubuntu.

Docker
FROM [1]
Drag options to blanks, or click blank then click option'
Aubuntu:latest
Bnginx
Ccontainer
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' or 'container' instead of a valid image name after FROM.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps each container name to its status if the status is 'running'.

Docker
{container['[1]']: container['[2]'] for container in containers if container['status'] == 'running'}
Drag options to blanks, or click blank then click option'
Aname
Bstatus
Cid
Dimage
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'id' or 'image' instead of 'name' or 'status'.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps each image's tag to its size if the size is greater than 100MB.

Docker
{image['[1]']: image['[2]'] for image in images if image['[3]'] > 100}
Drag options to blanks, or click blank then click option'
Aid
Bsize
Ctag
Dcreated
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'id' or 'created' instead of 'tag' or 'size'.