Docker Community Forums

Share and learn in the Docker community.

Assigning additional IPs to the Docker container


(Verzunof) #1

Hello,

As I understand, container gets one IP from the DHCP when starts.

Is there away to add additional IPs to the container, so that Docker knows about them and do not distribute them to other containers to avoid conflicts?

Thanks


(Ranjandas) #2

Hi,

Why do you want the containers and IP’s to be tightly coupled? Containers when compared to traditional vm’s are more dynamic when we consider the life cycle of containers.

Why do you want to reserve additional ip’s to the container? Can you elaborate on your use case. So that people can give more apt and container centric solutions which may help you in implementing a better scalable solution.

Regards


(Verzunof) #3

Hi,
Thank you for responding.

I don’t really want containers and IPs to be coupled.
I just want an application, running in the container to listen on a number of IPs for different purposes.
I can grad those IPs, but since docker would not know about this it may distribute the same IPs to other containers,
creating conflict. So the wish would be to ask docker for additional IPs or take IPS and inform docker not use them for other purposes.

Thanks