Chapter 2
- Correct answers: (B) Bind mounts and (C) Volumes. Only a Docker volume and bind mount provide persistency to a container. tmpfs volumes are stored in RAM and are not written to disk.
- Correct answer: (A) True. A volume must be created before it can be used in a container. If a volume is not created before running a container, Docker will create the volume before mounting it to the container.
- Correct answer: (D) 32 GB. If a tmpfs size is not specified, Docker will create a volume that is equal to half of the host's RAM.
- Correct answer: (B) False. Stopping or removing an image will not remove a persistent volume by default. To delete a volume, you can add the
-v
option to thedocker rm
command, or you can use thedocker volume rm
command to remove the volume manually. - Correct answer: (B) Named volumes. Only anonymous and named volumes are managed by the Docker daemon.
- Correct answer: (D) You must manually delete the Bind folder. Since Bind mounts...