I deployed a mail server in a container and ordered an additional IP for it on the hosting. Now on the host machine 2 IP addresses. One for all other containers, the other exclusively for mail.

All the ports when launching the mail container are exposed to an additional IP and there are no problems with incoming connections. But outgoings still use the first (primary) IP as the gateway. Question: How to make the mail container knock on the Internet through an additional IP (and not through the main one, like all other containers).

Thank.

  • most likely, the necessary documentation can be found on request docker configure default bridge - etki

0