Dockler sets container IP address from DHCP / DNS automatically

While I have discovered several options to force docker containers to have an IP address that matches my DNS, I have not found any way to force a persistent IP address automatically when docker starts.

I currently have a small script that fetches IP addresses from my DNS network and container configurations directly from the docker host. Unfortunately this method does not work with autostart, preventing tools like docker-ui from being used.

My script is available at https://gist.github.com/fulup-bzh/8fd32c8cde9a1e5ec971 the script works great, but I would like it to happen automatically to allow users to use tools like "docker-ui"

Question: - is there a way to force the "autorun" script at the host level during "docker run" startup? - alternatively, is there a way to automatically set the container IP address from DHCP from the host?

+3
docker dns network-programming production dhclient


source to share


No one has answered this question yet

Check out similar questions:

3382
How is Docker different from a virtual machine?
1330
Copy files from host to Docker container
1182
Copying files from Docker container to hosting
1175
How do I get the IP address of the Docker container from the host?
1148
How to remove old Docker containers
1120
How to copy Docker images from one host to another without using a repository
1107
From within a Docker container, how do I connect to the localhost of the machine?
890
How to list containers in Docker
763
What is the difference between a Docker image and a container?
513
Running Docker image as container



All Articles
Loading...
X
Show
Funny
Dev
Pics