Загрузка...

Assign a public IPv6 to a Docker container

Assign a public IPv6 to a Docker container

Assigning a public IPv6 to a Docker container requires careful configuration. Ensure your host has IPv6 enabled and a routable public IPv6 subnet. Edit `/etc/docker/daemon.json` to enable `ipv6` and set a `fixed-cidr-v6` (e.g., `"2001:db8:1::/64"`), then restart Docker. Next, create a Docker network, specifying an IPv6 subnet from your public range and a gateway. For example: `docker network create --ipv6 --subnet 2001:db8:2::/64 --gateway 2001:db8:2::1 my_public_ipv6_net`. This subnet must be part of your host's public IPv6 space. Launch your container, connecting it to this network and optionally assigning a specific IPv6 address using `--ip6`: `docker run -it --network my_public_ipv6_net --ip6 2001:db8:2::100 my_image`. Crucially, configure host routing for the Docker network's IPv6 subnet to the Docker bridge, and adjust firewalls to permit inbound/outbound traffic to the container's public IPv6. This setup provides direct, end-to-end public IPv6 connectivity for your container.

--------------

Video link: https://youtu.be/gkSQ878jbs8
Channel link: https://www.youtube.com/@HeyInsights

Have questions or thoughts? Leave a comment below. Thank you! 😃

Видео Assign a public IPv6 to a Docker container канала Hey Insights
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять