AnsweredAssumed Answered

Migrating LXC setup to Docker containers

Question asked by Leviya Bl on Dec 1, 2017


Im migrating my LXC setup to a docker based solution since most of them just run a single application anyways.

I need to keep the current network settings i have from my current LXC setup where all containers have routable addresses on the host network and are reachable by other services and devices on the network.

Im unable to do so using docker containers, the closest i got was by creating a/etc/docker/daemon.json with the following contents:

{    "bridge": "br0",    "default-gateway": "",    "dns": ["",""] }

I can ping and connect to it but i have no control over the container IP address, if try setting it on launch i get this error

root@fungus ~ # docker run -it --net host --ip ubuntu /bin/bash  docker: Error response from daemon: user specified IP address is supported on user defined networks only.

Im also unable to change it inside the the container itself.

I just need to set the address of these containers but i cant figure out whats wrong... im running docker-ce 17.09 on CentOS 7

Thank you