Docker Community Forums

Share and learn in the Docker community.

Need Help. how to set container source ip


(2hang) #1

I have many addresses in a ubuntu server.

There is a server need different source ip for registing, so i want set container network source.

how can i do ?

  • ubuntu 18.04
  • docker 18.03.1-ce
  • ipv6

(Agowa338) #2

You cannot, except if you use host networking, than you select the source address inside of your container yourself. But that is somewhat ugly. Can’t you just fix the issue on the other end?


(2hang) #3

Thanks.

I using host networking(–net=host) now, and del the address registed already when new service registing.

Then add the address after registed.

It’s not a good way.