1

By default, none of my docker-compose containers have access to the internet. We can expose ports to the host, but not from the internet. Any solutions on the web point me towards using network: host or --net=host, but this would almost totally miss the point of using containers, because it completely fuses the container's and host's networks.

I only want to access a specific domain on a specific port. One example could be sending a mail from inside my container to smtp.mailtrap.io on port 25. I'd like to keep my container separated from my host.

Is this possible? If so, can you provide the steps that are required to achieve something like this in a docker-beginner-level language?

fameman
  • 111
  • 2

0 Answers0