Image Layers
Which characteristic best describes how Docker images are built?
- A. Monolithically, as a single file.
- B. In layers, where each layer represents a set of instructions.
- C. By combining multiple base operating systems at once.
- D. Randomly, based on the build server's configuration.
- E. As a compressed tarball of all application files.
Container Isolation
What operating system level feature does Docker use to provide container isolation?
- A. Virtual Machines
- B. Namespaces and Control Groups (cgroups)
- C. Java Virtual Machine (JVM)
- D. Kernel patching
- E. Hypervisors
Docker Compose
Which Docker Compose command starts all services defined in a `docker-compose.yml` file?
- A. docker-compose run
- B. docker-compose start
- C. docker-compose up
- D. docker-compose build
- E. docker-compose create
Image Size Optimization
Which practice is most effective for reducing Docker image size?
- A. Using larger base images.
- B. Installing unnecessary packages.
- C. Combining multiple RUN instructions into one.
- D. Caching package manager indexes agressively
- E. Saving build artifacts directly into the image.
Container Networking
What is the default networking mode for containers created by Docker?
- A. Host
- B. None
- C. Bridge
- D. Overlay
- E. Macvlan
Dockerfile FROM Instruction
What is the purpose of the `FROM` instruction in a Dockerfile?
- A. Specifies the username and password for accessing the image.
- B. Defines the working directory for the container.
- C. Specifies the base image for the container.
- D. Defines the exposed port of the container.
- E. Copies files from the host to the container
Docker Volumes
What is the primary benefit of using Docker volumes?
- A. To increase container CPU performance.
- B. To store persistent data outside of the container's lifecycle.
- C. To isolate container processes from the host operating system.
- D. To compress image size
- E. To prevent containers from using network resources.
Docker Hub
What is the main purpose of Docker Hub?
- A. A container runtime environment
- B. A cloud-based container registry service
- C. A tool for building container images
- D. A software for orchestration containers
- E. A network proxy for container communication
Security Best Practices
Which of the following is a Docker security best practice?
- A. Running containers as the root user.
- B. Exposing all container ports to the internet.
- C. Regularly updating base images with security patches.
- D. Disabling container resource limits.
- E. Storing sensitive information directly in the Dockerfile.
Docker Compose Scaling
Which Docker Compose command is used to scale the number of instances of a service?
- A. docker-compose scale
- B. docker-compose replicas
- C. docker-compose instances
- D. docker-compose up --scale
- E. docker-compose expand