Q.1 The virtual bridge that the Docker establishes is called ________.
A. docker1
B. docker0
C. docker network
D. docker bridge
Ans : docker0
Q.2 What is the Docker command to disconnect a container from the bridge network?
A. docker disconnect bridge <container>
B. docker network disconnect <container>
C. docker network disconnect bridge <container>
D. None of the options
Ans : docker network disconnect bridge <container>
Q.3 The default Inet address for Docker is _________.
A. 172.17.42.2
B. 172.17.42.1
C. There is no default address
D. 172.17.42.3
Ans : 172.17.42.1
Q.4 When a container is started, Docker establishes a bridge between __________.
A. host machine and container
B. host machine and image
C. image and container
D. None of the options
Ans : host machine and container
Q.5 Docker network inspect command will list the containers running in the network.
A. True
B. False
Ans : True
Q.6 What is the Docker command syntax to inspect a Docker bridge?
A. docker inspect bridge
B. docker network inspect bridge
C. docker ls
D. None of the options
Ans : docker network inspect bridge
Q.7 Which among the following network can be created by users?
A. Bridge and host network
B. Bridge and Overlay network
C. Host and Container network
D. None of the options
Ans : Bridge and Overlay network
Q.8 Container networking model explains the ________ architecture.
A. Security
B. Networking
C. Storage
D. All the options
Ans : Networking
Q.9 On installing Docker, the three networks that are automatically created are ________.
A. overlay, host, bridge
B. bridge, overlay, none
C. host, none, overlay
D. bridge, host, none
Ans : bridge, host, none
Q.10 Which of the following are storage drivers supported by Docker for Ubuntu systems?
A. zfs
B. devicemapper
C. aufs
D. overlay2
E. All the options
Ans : All the options
Q.11 Which Docker command is used to know the current storage driver configured?
A. docker bridge
B. docker version
C. docker storage
D. docker info
Ans : docker info
Q.12 Which of the following is correct?
A. Multiple container layers can be built on top of an image layer
B. One Container layer can be built on top of an image layer
C. The container layer cannot be built on top of the image layer
Ans : Multiple container layers can be built on top of an image layer
Q.13 Which of the following is the Docker command to remove unused volumes?
A. docker volume delete
B. docker volume prune
C. docker volume remove
D. All the options
Ans : docker volume prune
Q.14 Configuration changes should be done in __________ file to modify the storage driver used.
A. storage.json
B. file.json
C. daemon.json
D. driver.json
Ans : daemon.json
Q.15 Storage driver and data volumes are independent of each other.
A. True
B. False
Ans : True
Q.16 Docker volumes can be backed up/restored/migrated.
A. True
B. False
Ans : True
Q.17 Container storage layer is read-only.
A. True
B. False
Ans : False
Q.18 Which of the following is a valid Docker command to add a data volume?
A. docker run -d -P –name web -vol /webapp training/webapp
B. docker run -d -P –name web -v- /webapp training/webapp
C. docker run -d -P –name web -v /webapp training/webapp
D. None of the options
Ans : docker run -d -P –name web -v /webapp training/webapp
Q.19 Storage driver manages the contents of ____________.
A. Container layer
B. Images layer
C. Images and container layer
D. None of the options
Ans : Images and container layer
Q.20 Which is the Docker syntax to locate a volume which is mounted to a container?
A. docker inspect <container_name> <container_name>
B. docker inspect <volume_name>
C. docker inspect <container_name>
D. None of the options
Ans : docker inspect <container_name>
Q.21 Which of the following is a valid docker inspect command to display the log path?
A. docker inspect –format='{{.LogPath}}’ tomcatContainer
B. docker inspect –format='{{.Path}}’ tomcatContainer
C. docker inspect –format='{{.Log}}’ tomcatContainer
D. None of the options
Ans : docker inspect –format='{{.LogPath}}’ tomcatContainer
Q.22 Storage drivers cannot be modified and configured in Docker.
A. True
B. False
Ans : False
Q.23 Using docker compose, we cannot bring up more than one service.
A. True
B. False
Ans : False
Q.24 Docker images have a different state and change with time.
A. True
B. False
Ans : False
Q.25 Which of the following is the syntax to inspect data volumes?
A. docker inspect <volume_name>
B. docker volume inspect <volume_name>
C. docker volume inspect <container_name> <volume_name>
D. None of the options
Ans : docker volume inspect <volume_name>
Q.26 What happens when you execute the following command? docker run debian /bin/sh
A. Docker CLI issues an error
B. A container is created and executed in the detached mode
C. A prompt from the shell of the created container will be thrown
D. A container is created and exited immediately
Ans : A container is created and exited immediately
Q.27 Which Dockerfile instruction can be used to install packages to our new image?
A. RUN
B. apt-get install
C. CMD
D. FROM
Ans : RUN
Q.28 Which is the Docker command to build a docker image using a docker file in the current directory?
A. docker build-image
B. docker build image
C. docker build
Ans : docker build
Q.29 Which of the following commands will install the Docker engine (Community edition) in a Centos server?
A. yum install docker-ce
B. apt-get install docker
C. apt-get install docker.i.o
D. yum install docker
Ans : yum install docker-ce
Q.30 What happens when you press Cntrl+P+Q inside the container?
A. Kills the container
B. Generates a stack trace
C. Detaches the Docker host terminal from the container
D. Issues print screen on the current contents of the terminal window
Ans : Detaches the Docker host terminal from the container
Q.31 Which is the Docker command to show the version information of the docker components?
A. docker version
B. docker detail
C. docker v
D. apt-get update
Ans : docker version
Q.32 Three events that are captured in docker diff command are _______.
A. N- New, U – Update, R – Remove
B. A – Add, D – Delete, C -Change
C. U- Update, D- Delete, C -Create
D. None of the options
Ans : A – Add, D – Delete, C -Change
Q.33 _________ is a tool for defining and running multi-container Docker applications.
A. docker hub
B. docker compose
C. docker file
D. docker hub
Ans : docker compose
Q.34 What is the command to stop a container?
A. Docker-stp <Container>
B. docker halt <Container>
C. docker stop <Container>
D. docker-stop <Container>
Ans : docker stop <Container>
Q.35 Which of the following commands will start a container based on Ubuntu 14.04 base image?
A. docker run ubuntu -v 14.04
B. docker run ubuntu -version 14.04
C. docker run ubuntu:14.04
D. docker run Ubuntu:14.04
Ans : docker run ubuntu:14.04
Q.36 Which of the following is another term to describe container virtualization?
A. OS level virtualization
B. Software defined data center
C. Hypervisor vitualization
D. Storage vitualization
Ans : OS level virtualization
Q.37 Which docker command is used to attach to a running container?
A. docker telnet <Container>
B. docker login <Container>
C. docker ssh <Container>
D. docker attach <Container>
Ans : docker attach <Container>
Q.38 What is the syntax to mount a ‘/project/data’ directory from the docker host into a directory ‘/data’ in the container?
A. docker run -v /project/data:/data
B. docker run -v from /data:/project/data
C. docker run -volumes from /data:/project/data
D. docker run -v /data:/project/data
Ans : docker run -v /project/data:/data
Q.39 Which option can we pass to the Docker daemon to assign a docker bridge to a specific IP range?
A. –cidr
B. –bip
C. –network
D. –ip–range
Ans : –bip