11.) How do you view the layers of a Docker image?
A) docker history
B) docker inspect
C) docker layers
D) docker logs
12.) What is the default Docker image registry?
A) Google Container Registry
B) AWS Elastic Container Registry
C) Docker Hub
D) Azure Container Registry
13.) What does the docker rmi command do?
A) Removes a running container
B) Removes an unused Docker image
C) Removes all Docker containers
D) Removes Docker networking configurations
14.) What is a lightweight base image commonly used in Docker?
A) Ubuntu
B) CentOS
C) Alpine
D) Fedora
15.) What does the docker tag command do?
A) Builds a new Docker image
B) Deletes a Docker image
C) Pushes an image to a registry
D) Assigns a tag to a Docker image
16.) Which instruction in a Dockerfile is used to run a command during the build process?
A) RUN
B) CMD
C) ENTRYPOINT
D) WORKDIR
17.) What does the FROM instruction in a Dockerfile do?
A) Starts a new container
B) Specifies the base image for the new Docker image
C) Sets the working directory in the container
D) Copies files to the container
18.) What is the purpose of the COPY instruction in a Dockerfile?
A) To copy files from one container to another
B) To move files within the container
C) To create a backup of the Docker image
D) To copy files from the local machine to the image during build
19.) What is the primary purpose of the CMD instruction in a Dockerfile?
A) CMD sets the base image
B) CMD provides default commands
C) CMD defines executable instructions
D) CMD is for environment variables
20.) What is the primary purpose of the ENTRYPOINT instruction in a Dockerfile?
A) ENTRYPOINT sets the base image
B) ENTRYPOINT provides default commands
C) ENTRYPOINT defines executable instructions
D) ENTRYPOINT is for environment variables
Related