Docker image doesn't listen on IPv6 #135

Closed
opened 2026-10-26 09:01:57 +00:00 by mbunkus · 5 comments

I'm using IPv6 in my Docker setup, but the server process only listens on IPv4. In the container logs I can actually see that there are provisions for setting up listening on IPv6, but that seems to run into some kind of permission issue:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-api-base-url.sh
api-base-url set to https://inbuxa.bunkus.org/
/docker-entrypoint.sh: Configuration complete; ready for start up

This is the excerpt from my compose.yaml:

  inbuxa-console:
    image: "registry.coffeylabs.org/inbuxa/inbuxa-admin:latest"
    restart: "unless-stopped"
    depends_on:
      - "inbuxa-server"
    hostname: "inbuxa-console"
    environment:
      API_BASE_URL: "https://inbuxa.bunkus.org/"
    ports:
      - "46801:8080"  # HTTP admin (during setup)
    networks:
      - "net"

networks:
  net:
    enable_ipv6: true

Note that the same networks: … - "net" works just fine with IPv6 for the Inbuxa server container.

Tested via curl -sv http://127.0.0.1:46801, which works, vs curl -sv 'http://[::1]:46801, which gives me the usual when the Docker proxy does listen on IPv6 but it cannot reach the daemon within the container via IPv6:

[0 root@zubrette 0.013s /srv/inbuxa/logs] curl -sv 'http://[::1]:46801'
*   Trying [::1]:46801...
* Established connection to ::1 (::1 port 46801) from ::1 port 59772
* using HTTP/1.x
> GET / HTTP/1.1
> Host: [::1]:46801
> User-Agent: curl/8.18.0
> Accept: */*
>
* Request completely sent off
* Empty reply from server
* shutting down connection #0
I'm using IPv6 in my Docker setup, but the server process only listens on IPv4. In the container logs I can actually see that there are provisions for setting up listening on IPv6, but that seems to run into some kind of permission issue: ``` /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?) /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/40-api-base-url.sh api-base-url set to https://inbuxa.bunkus.org/ /docker-entrypoint.sh: Configuration complete; ready for start up ``` This is the excerpt from my `compose.yaml`: ```yaml inbuxa-console: image: "registry.coffeylabs.org/inbuxa/inbuxa-admin:latest" restart: "unless-stopped" depends_on: - "inbuxa-server" hostname: "inbuxa-console" environment: API_BASE_URL: "https://inbuxa.bunkus.org/" ports: - "46801:8080" # HTTP admin (during setup) networks: - "net" networks: net: enable_ipv6: true ``` Note that the same `networks: … - "net"` works just fine with IPv6 for the Inbuxa server container. Tested via `curl -sv http://127.0.0.1:46801`, which works, vs `curl -sv 'http://[::1]:46801`, which gives me the usual when the Docker proxy does listen on IPv6 but it cannot reach the daemon within the container via IPv6: ``` [0 root@zubrette 0.013s /srv/inbuxa/logs] curl -sv 'http://[::1]:46801' * Trying [::1]:46801... * Established connection to ::1 (::1 port 46801) from ::1 port 59772 * using HTTP/1.x > GET / HTTP/1.1 > Host: [::1]:46801 > User-Agent: curl/8.18.0 > Accept: */* > * Request completely sent off * Empty reply from server * shutting down connection #0 ```
Owner

Thanks @mbunkus, good catch. nginx's own IPv6 step skips a default.conf it didn't ship, so ours never got the [::] listener. The image now adds it at start whenever the host has IPv6. Fixed in #136, and it'll be in the next console release.

Thanks @mbunkus, good catch. nginx's own IPv6 step skips a default.conf it didn't ship, so ours never got the [::] listener. The image now adds it at start whenever the host has IPv6. Fixed in #136, and it'll be in the next console release.
Owner

This is out now in v2026.10.26.2, and :latest has it.

This is out now in v2026.10.26.2, and `:latest` has it.
Author

Unfortunately the current :latest doesn't start/gets stuck in a boot loop:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
/docker-entrypoint.sh: Launching /docker-entrypoint.d/11-listen-ipv6.sh
listening on IPv6 as well
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-api-base-url.sh
api-base-url set to https://inbuxa.bunkus.org/
/docker-entrypoint.sh: Configuration complete; ready for start up
2026/11/01 13:25:28 [emerg] 1#1: a duplicate listen [::]:8080 in /etc/nginx/conf.d/default.conf:4
nginx: [emerg] a duplicate listen [::]:8080 in /etc/nginx/conf.d/default.conf:4
Unfortunately the current `:latest` doesn't start/gets stuck in a boot loop: ``` /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version /docker-entrypoint.sh: Launching /docker-entrypoint.d/11-listen-ipv6.sh listening on IPv6 as well /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/40-api-base-url.sh api-base-url set to https://inbuxa.bunkus.org/ /docker-entrypoint.sh: Configuration complete; ready for start up 2026/11/01 13:25:28 [emerg] 1#1: a duplicate listen [::]:8080 in /etc/nginx/conf.d/default.conf:4 nginx: [emerg] a duplicate listen [::]:8080 in /etc/nginx/conf.d/default.conf:4 ```
mbunkus reopened this issue 2026-11-01 13:26:30 +00:00
Owner

@mbunkus you got lucky: my next flight got delayed, so I'm stuck in an airport with nothing to do.

Sorry about the boot loop, that was a bug in my fix. Every start added another IPv6 listener, so the first restart gave nginx a duplicate and it refused to start. A fresh container was fine, which is why I didn't catch it. The fix was already on main, but only in the 27.1 release candidates, and those don't move :latest.

It's out now in v2026.10.26.3 (#156), and :latest has it. docker compose pull inbuxa-console && docker compose up -d inbuxa-console will replace the stuck container. I restarted the new image several times here, including on an IPv6 network like yours, and it stayed up and answered on both IPv4 and IPv6.

Let me know if it works for you and I'll close this.

@mbunkus you got lucky: my next flight got delayed, so I'm stuck in an airport with nothing to do. Sorry about the boot loop, that was a bug in my fix. Every start added another IPv6 listener, so the first restart gave nginx a duplicate and it refused to start. A fresh container was fine, which is why I didn't catch it. The fix was already on main, but only in the 27.1 release candidates, and those don't move `:latest`. It's out now in v2026.10.26.3 (#156), and `:latest` has it. `docker compose pull inbuxa-console && docker compose up -d inbuxa-console` will replace the stuck container. I restarted the new image several times here, including on an IPv6 network like yours, and it stayed up and answered on both IPv4 and IPv6. Let me know if it works for you and I'll close this.
Author

Looks good! Thanks for the quick fix.

Looks good! Thanks for the quick fix.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-admin#135