Docker Container Won't Connect to Host Network

[NB] If the docker-compose up and the docker container won't connect to the host network, make sure you have a defined network in your docker-compose file.

version: "3"



    build: .

    image: name_of_your_image

    network_mode: host

[NB] If you are using Docker Desktop for Windows, this network section should have a "default" instead of "host". host only works on Linux based Operating System.

Edit this Article
Docker docker-compose.yaml Micro-Service Docker published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy