11.) Which protocol is primarily used by Docker for container communication?
12.) How can you disconnect a container from a network?
A) docker network disconnect <network> <container>
B) docker disconnect <network> <container>
C) docker remove <network>
D) docker detach <network>
13.) What is the default subnet for the bridge network in Docker?
A) 172.17.0.0/16
B) 192.168.0.0/24
C) 10.0.0.0/8
D) 127.0.0.0/8
14.) Which network driver is required for Docker Swarm to function?
A) Bridge
B) Host
C) None
D) Overlay
15.) What is the purpose of the EXPOSE instruction in a Dockerfile?
A) To map container ports to the host machine
B) To publish ports for the container
C) To specify ports the container listens on
D) To block all ports of the container
16.) Which tool is used to resolve container names to IP addresses in Docker?
A) DNS server
B) Docker DNS
C) Bridge resolver
D) Network manager
17.) How do you publish a container port to the host system?
A) Using the -p or –publish flag in docker run
B) Using the –expose flag in docker run
C) Using the –dns flag in docker run
D) By modifying the Dockerfile
18.) What is the purpose of the -P flag in the docker run command?
A) To publish ports explicitly
B) To enable port forwarding
C) To pause the container after running
D) To automatically map container ports to random host ports
19.) How do you specify a custom subnet when creating a Docker network?
A) docker network create –subnet=<subnet>
B) docker network create –ip-range=<subnet>
C) docker network create –cidr=<subnet>
D) docker network create –mask=<subnet>
20.) Which command inspects the IP address of a running container?
A) docker ps
B) docker ip <container>
C) docker network ip
D) docker inspect <container>
Related