Question#1 The virtual bridge that the Docker establishes is called ________.
a) docker1
b) docker0
c) docker network
d) docker bridge
Answer:- docker0
Question#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
Answer:- docker network disconnect bridge <container>
Question#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
Answer:- 172.17.42.1
Question#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
Answer:- host machine and container
Question#5 Docker network inspect command will list the containers running in the network.
a) True
b) False
Answer:- True
Question#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
Answer:- docker network inspect bridge
Question#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
Answer:- Bridge and Overlay network
Question#8 Container networking model explains the ________ architecture.
a) Security
b) Networking
c) Storage
d) All the options
Answer:- Networking
Question#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
Answer:- bridge, host, none
Question#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
Answer:- All the options
Question#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
Answer:- docker info
Question#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
Answer:- Multiple container layers can be built on top of an image layer
Question#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
Answer:- docker volume prune
Question#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
Answer:- daemon.json
Question#15 Storage driver and data volumes are independent of each other.
a) True
b) False
Answer:- True
Question#16 Docker volumes can be backed up/restored/migrated.
a) True
b) False
Answer:- True
Question#17 Container storage layer is read-only.
a) True
b) False
Answer:- False
Question#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
Answer:- docker run -d -P –name web -v /webapp training/webapp
Question#19 Storage driver manages the contents of ____________.
a) Container layer
b) Images layer
c) Images and container layer
d) None of the options
Answer:- Images and container layer
Question#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
Answer:- docker inspect <container_name>
Question#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
Answer:- docker inspect –format='{{.LogPath}}’ tomcatContainer
Question#22 Storage drivers cannot be modified and configured in Docker.
a) True
b) False
Answer:- False
Question#23 Using docker compose, we cannot bring up more than one service.
a) True
b) False
Answer:- False
Question#24 Docker images have a different state and change with time.
a) True
b) False
Answer:- False
Question#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
Answer:- docker volume inspect <volume_name>
Question#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
Answer:- A container is created and exited immediately
Question#27 Which Dockerfile instruction can be used to install packages to our new image?
a) RUN
b) apt-get install
c) CMD
d) FROM
Answer:- RUN
Question#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
Answer:- docker build
Question#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
Answer:- yum install docker-ce
Question#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
Answer:- Detaches the Docker host terminal from the container
Question#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
Answer:- docker version
Question#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
Answer:- A – Add, D – Delete, C -Change
Question#33 _________ is a tool for defining and running multi-container Docker applications.
a) docker hub
b) docker compose
c) docker file
d) docker hub
Answer:- docker compose
Question#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>
Answer:- docker stop <Container>
Question#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
Answer:- docker run ubuntu:14.04
Question#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
Answer:- OS level virtualization
Question#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>
Answer:- docker attach <Container>
Question#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
Answer:- docker run -v /project/data:/data
Question#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
Answer:- –bip