New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Docker DCA Exam - Topic 6 Question 113 Discussion

Actual exam question for Docker's DCA exam
Question #: 113
Topic #: 6
[All DCA Questions]

You want to create a container that is reachable from its host's network. Does this action accomplish this?

Solution: Use --link to access the container on the bridge network.

Show Suggested Answer Hide Answer
Suggested Answer: B

= The action of using--linkto access the container on the bridge network doesnotaccomplish the goal of creating a container that is reachable from its host's network.The--linkoption allows you to connect containers that are running on the same network, but it doesnotexpose the container's ports to the host1.To create a container that is reachable from its host's network, you need to use the--network hostoption, which attaches the container to the host's network stack and makes it share the host's IP address2.Alternatively, you can use the--publishor-poption to map the container's ports to the host's ports3.

: :Legacy container links | Docker Documentation:Networking using the host network | Docker Documentation:docker run reference | Docker Documentation


Contribute your Thoughts:

0/2000 characters
Arminda
2 months ago
Really? I didn't know that!
upvoted 0 times
...
Ma
2 months ago
I thought --link was deprecated though?
upvoted 0 times
...
Carmela
3 months ago
No, you need to use --network instead.
upvoted 0 times
...
Adell
3 months ago
Definitely not the best practice anymore.
upvoted 0 times
...
Claudio
3 months ago
Yes, --link is a way to connect containers!
upvoted 0 times
...
Jacquelyne
3 months ago
I vaguely remember that to expose a container to the host, you usually need to use port mapping instead of --link.
upvoted 0 times
...
Michal
4 months ago
I'm a bit unsure, but I thought --link was mainly for communication between containers on the same network, not for host access.
upvoted 0 times
...
Valentin
4 months ago
I feel like I practiced a question similar to this, and I think the answer was no. The --link option is outdated for networking.
upvoted 0 times
...
Amie
4 months ago
I think using --link might not actually make the container reachable from the host's network. I remember it being more about connecting containers rather than exposing them.
upvoted 0 times
...
Mitsue
4 months ago
The key here is that we want the container to be reachable from the host's network, not just the bridge network. The solution mentions --link, which I believe is used for linking containers, not making them accessible from the host. I'll need to review my networking concepts to be sure.
upvoted 0 times
...
Raymon
4 months ago
Wait, I'm a little confused. Isn't the bridge network just for internal container-to-container communication? I'm not sure that would make the container reachable from the host's network. I'll have to think this through more carefully.
upvoted 0 times
...
Staci
5 months ago
Okay, I think I know the answer to this. Connecting a container to the bridge network should make it reachable from the host's network. Let me double-check the details, but I'm feeling confident about this.
upvoted 0 times
...
Rodolfo
5 months ago
Hmm, I'm not sure about this one. The solution mentions using --link, but I'm not familiar with that Docker command. I'll need to review my notes on networking containers.
upvoted 0 times
...
Milly
7 months ago
Yes, I agree with Pete. Using --link is the solution for accessing the container on the bridge network.
upvoted 0 times
...
Paris
7 months ago
No, I think there might be other ways to make the container reachable.
upvoted 0 times
...
Vicente
7 months ago
Wait, is this a trick question? I'm pretty sure the --link option is not the way to go these days. Gotta be B, right?
upvoted 0 times
...
Pansy
7 months ago
Seriously? --link? What is this, 2015? Everyone knows you use the bridge network these days. Time to get with the times, folks.
upvoted 0 times
Beckie
6 months ago
No
upvoted 0 times
...
Twanna
6 months ago
Yes
upvoted 0 times
...
...
Raylene
7 months ago
Ah, the old --link trick. Brings back memories of the good ol' days of Docker. But hey, at least it gets the job done!
upvoted 0 times
...
Pete
7 months ago
Yes, using --link allows access on the bridge network.
upvoted 0 times
...
Bea
7 months ago
No way, that can't be right. Didn't they switch to using the bridge network by default? Time to hit the docs again.
upvoted 0 times
Milly
6 months ago
Yes, you're right. We should double-check the documentation to be sure.
upvoted 0 times
...
Pauline
6 months ago
No, I don't think that's correct. They switched to using the bridge network by default.
upvoted 0 times
...
...
Lorriane
8 months ago
Hmm, I thought the --link option was deprecated. Guess I need to brush up on my container networking!
upvoted 0 times
Elke
7 months ago
Hmm, I thought the --link option was deprecated. Guess I need to brush up on my container networking!
upvoted 0 times
...
Tamesha
7 months ago
B) No
upvoted 0 times
...
Nikita
7 months ago
A) Yes
upvoted 0 times
...
...

Save Cancel