Docker containers running on custom network cannot connect to the internet


Recommended Posts

I recently had an issue with my cache drive and lost all my docker container configurations. So I've had to start over.


I previously had a custom docker network defined and a number of my docker containers connected to that network and things worked great. All those containers could connect to one another using internal IP addresses and the docker containers could connect to the outside world (internet) as well.


However, now that I'm trying to set everything up from scratch again it seems like no matter how I define the custom network in docker any docker containers running using that network have no internet access. For example, I'm defining the network using: "docker network create --subnet= letsencrypt-nginx"


Then if I run any docker container and have it run on that network and give it an ip in that subnet (say,, that container cannot connect to the internet. This has been frustrating me to no end for 2 hours now so I decided to resort to asking for help here in the forums.


If anyone can tell me how I can allow my containers connected to my custom network access to the internet I'd appreciate it!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.