Docker Community Forums

Share and learn in the Docker community.

Connect to localhost from container


(Ninghu111) #1

Hi, I didn’t see any category for Ubuntu (16.04) help, so I hope it’s okay for me to post my question in the General Discussion.

As the title suggests, I’m looking for a way to go to http://127.0.0.1 from within a Docker container. I have two Docker networks–one for my app and one for my website. I have the website server inside the host network, and I’m trying to access it with my app server using http://127.0.0.1.

My docker-compose version is 2. Due to unrelated circumstances, I’m not in a position where I can update it.

Please let me know if more information is necessary.
Any help is appreciated!

Edit: Solved. I misunderstood how the host network works.