How to configure a Docker container to be reachable by container_ip:port from outside the host machine?

前端 未结 2 968
小鲜肉
小鲜肉 2021-01-02 03:57

I have a host machine with multiple IP addresses assigned to one network interface. I\'d like to configure Docker in order to have containers \"responding\" each one to a si

2条回答
  •  执笔经年
    2021-01-02 04:13

    This answer explain exactly what I want to obtain in a very simple way.

    The idea is to have different IP addresses on the host machine, for example using IP aliasing on a single network interface and then launch each container specifying the IP address to where they will be reachable in addition to the exposed port (see the linked answer for an example).

提交回复
热议问题