Docker containers fail to restart with ipv6 enabled with LLA fixed cidr

We are experimenting the docker development with ipv6 with Linked local address, but error occured when we restart the container.

Step to reproduce the error:

  1. As link local communication is needed, I overrided the /etc/docker/daemon.json file
  "ipv6": true,
  "fixed-cidr-v6": "fe80::1/64"
  1. Restart the docker service to apply the change
service docker restart
  1. Launch any docker container and kill it.
docker container run --detach nginx:latest
docker kill <container_id>
  1. Re-run the docker container
docker container run --detach nginx:latest

And it shows docker: Error response from daemon: Address already in use.

If we change the fixed-cidr-v6 field with another subnet range “2001:db8:1::/64”, the restart will work, however we cannot do the local communication that we want for experiment.

ip 6 route

::1 dev lo proto kernel metric 256 pref medium
fe80::/64 dev docker0 metric 1024 linkdown pref medium

docker version: 23.0.5

Are you aware that the prefix 2001:db8::/32 is used for documentation purposes only? That’s why you find it as placeholder in documentations.

I am not sure if fe80::1/64 is literarily used as ip in the subnet fe80::/64, or results in the subnet fe80::/64 being used. I guess you wanted to use fe80:1/64?

Personally, I would use an ULA instead of a LLA. Both will not allow internet access.