Questions
- Docker images use a layered model – true or false?
- You can delete an image from a server if a container using that image is already running – true or false?
- How do you remove a running container from a server? (Multiple answers are possible)
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? (Multiple answers are possible)
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. It is a best practice to include package managers and a shell within the container as it helps...