I'd like to have several Docker containers be on a network together, so that they can communicate with one and other, but not the internet, or any host not on that network.

I'd then like to take one of those containers, and attach it to a second network, so that it has a route to the internet, and then have that container be an internet gateway for the others. I'd like it to be impossible at the network level for these containers to get a packet out of their network unless it goes through the gateway container.

What's the best way to go about this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.