ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 180 - DCA discussion

Report
Export

You want to create a container that is reachable from its host's network.

Does this action accomplish this?

Solution. Use network connect to access the container on the bridge network.

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

Using network connect to access the container on the bridge network does not accomplish creating a container that is reachable from its host's network.The network connect command connects a container to an existing network, but it does not expose the container's ports to the host1.The bridge network is the default network that Docker creates for containers, and it provides isolation from the host network2.To create a container that is reachable from its host's network, you need to use the host network driver, which disables network isolation and uses the host's network stack directly3.Alternatively, you can use the port mapping feature to publish specific ports of the container to the host4.Reference:

docker network connect | Docker Docs

Bridge network driver | Docker Docs

Host network driver | Docker Docs

Publish ports on the host | Docker Docs

asked 08/11/2024
Ajayi Johnson
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first