0% found this document useful (0 votes)
5 views4 pages

db2 15 MCQ

The document contains a series of questions and answers related to Docker, including its primary use for application deployment in containers, commands for managing Docker containers, and the purpose of Docker components like Docker Hub and Dockerfiles. Key commands such as 'docker run' for creating containers and 'docker ps' for listing running containers are highlighted. Additionally, it explains the role of docker-compose in managing multi-container applications and the configuration file used for services.

Uploaded by

anurandey5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

db2 15 MCQ

The document contains a series of questions and answers related to Docker, including its primary use for application deployment in containers, commands for managing Docker containers, and the purpose of Docker components like Docker Hub and Dockerfiles. Key commands such as 'docker run' for creating containers and 'docker ps' for listing running containers are highlighted. Additionally, it explains the role of docker-compose in managing multi-container applications and the configuration file used for services.

Uploaded by

anurandey5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1. What is db2 primarily used for?

A. Virtual Machine Management​


B. Application Deployment in Containers​
C. File System Encryption​
D. Network Configuration​
Answer: B. Application Deployment in Containers

3. Which command is used to create and start a Docker container?

A. docker e start​
B. docker run​
C. docker​
D. docker init​
Answer: B. docker run

4. What does the docker ps command do?

A. Lists available Docker images​


B. Lists all processes running on the host​
C. Lists running Docker containers​
D. Lists stopped containers​
Answer: C. Lists running Docker containers

5. What is Docker Hub?

A. Docker’s file system​


B. A web server for hosting APIs​
C. A cloud-based registry for Docker images​
D. A local storage for containers​
Answer: C. A cloud-based registry for Docker images

6. What is the difference between a Docker image and a container?


A. An image is running, a container is static​
B. A container is a blueprint, an image is running​
C. An image is the blueprint, and a container is a running instance​
D. No difference​
Answer: C. An image is the blueprint, and a container is a running instance

7. What does the -d flag do in Docker?

A. Deletes the container​


B. Runs the container in detached mode​
C. Displays logs​
D. Deploys the container to production​
Answer: B. Runs the container in detached mode

8. How can you stop a running Docker container?

A. docker remove​
B. docker stop [container_id]​
C. docker halt​
D. docker pause​
Answer: B. docker stop [container_id]

9. What is the function of the Dockerfile?

A. Logs container activities​


B. Defines the container's memory limit​
C. Contains instructions to build a Docker image​
D. Stores container environment variables​
Answer: C. Contains instructions to build a Docker image

10. Which command is used to build a Docker image from a Dockerfile?

A. docker init​
B. docker compile​
C. docker build​
D. docker make​
Answer: C. docker build

11. What is the default network driver in Docker?

A. Host​
B. None​
C. Bridge​
D. Overlay​
Answer: C. Bridge

12. How can you remove all stopped containers in Docker?

A. docker clean​
B. docker rm $(docker ps -a -q)​
C. docker stop --all​
D. docker down​
Answer: B. docker rm $(docker ps -a -q)

13. Which Docker command is used to push an image to Docker Hub?

A. docker deploy​
B. docker image upload​
C. docker push​
D. docker export​
Answer: C. docker push

14. What does docker-compose help with?

A. Monitoring container performance​


B. Configuring network settings​
C. Defining and running multi-container Docker applications​
D. Building Docker images​
Answer: C. Defining and running multi-container Docker applications
15. Which file is used by docker-compose to configure services?

A. Dockerfile​
B. compose.json​
C. services.xml​
D. docker-compose.yml​
Answer: D. docker-compose.yml

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy