DevOps Tools Engineer (LPIC-OT 701) — Question 8
The following command is issued on two docker nodes:
docker network create --driver bridge isolated_nw
Afterwards, one container is started at each node with the parameter --network=isolated_nw. It turns out that the containers can not interact with each other.
What must be done in order to allow the containers to interact with each other? (Choose two correct answers.)
Answer options
- A. Use a host network instead of a bridged network.
- B. Add the option --inter-container to the docker network create command.
- C. Start the containers on the same node.
- D. Change the --network parameter of docker create to --network=isolated_nw,nofence.
- E. Use an overlay network instead of a bridged network.
Correct answer: C, D
Explanation
The correct answers are C and D. Starting the containers on the same node (C) allows them to communicate since they share the same network namespace. Changing the --network parameter to include --network=isolated_nw,nofence (D) allows for additional configurations to facilitate communication. Options A, B, and E do not address the requirement effectively as they either change the setup or introduce unnecessary complexity.