Docker Quiz - Part 1
1. Docker images have a different state and change with time.
Answer: true
2. Which of the following is true?
Answer: docker ps shows all running containers by default.
3. Which is the Docker command to show the version information of the docker components
Answer: docker version
4. Which Dockerfile instruction can be used to install packages to our new image
Answer: apt-get install XXX
5. Which of the following is another term to describe container virtualization?
Answer: Hypervisor vitualization
6. Which of the following is the correct way to name a docker file
Answer: Dockerfile
7. Virtual machines are a form of ____________ type of virtualization
Answer: Container
8. What is the command to stop a container
Answer: docker stop <Container>
9. What happens when you execute the command? Docker run debian /bin/sh
Answer: A prompt from shell of created container will be thrown to you
10. Three events that are captured in docker diff command are
Answer: ADC
11. is a tool for defining and running multi-container Docker applications.
Answer: docker compose
12. is a text document that contains all the commands a user could run on the command line to assemble an image.
Answer: Dockerfile
13. Which of the following command will install Docker engine in a Centos server
Answer: yum install docker
14. What happens when you press Cntrl + P + Q inside of container?
Answer: Detaches the Docker host terminal from the container
15. Which is the Docker command to build a docker image using docker file in the current directory
Answer: docker build .
16. Which docker command lets us attach to a running container
Answer: docker attach <container>
17. Which option can we pass to the docker daemon to assign docker bridge to specific IP range?
Answer: --ip--range
18. Which of the following command will start a container based on Ubuntu 14.04 base image
Answer: docker run ubuntu:14.04
19. By default, what mode do docker containers run in
Answer: foreground mode
20. What is the syntax to mount a /project/data directory from docker host into a directory /data in container
Answer: docker run -volumes from /data:/project/data