Questions
- Docker images use a layered model. (True/False)
- You can delete an image from a server if a container using that image is already running. (True/False)
- How do you remove a running container from a server? (Choose two)
A.
docker
rm <container_id>
B.
docker rm -
f <container_id>
C.
docker stop <container_id> && docker
rm <container_id>
D.
docker stop -
f <container_id>
- Which of the following options are container build best practices? (Choose four)
A. Always add layers that don’t frequently change at the beginning of the Dockerfile.
B. Combine multiple steps into a single directive to reduce layers.
C. Only use the required files in the container to keep it lightweight and reduce the attack surface.
D. Use semantic versioning in your Docker tags and avoid the latest version.
E. Include package managers and a shell within the container, as this helps with troubleshooting a running container.
F. Only use an
apt update
at the start...