PrivateBin / docker-unit-alpine

PrivateBin docker image based on Nginx Unit & Alpine Linux stack
https://hub.docker.com/r/privatebin/unit-alpine/
7 stars 1 forks source link

healthcheck fails on a IPv6 enabled docker daemon #3

Closed elrido closed 1 year ago

elrido commented 1 year ago

On a docker daemon that has IPv6 enabled (in /etc/docker/daemon.json: "ipv6": true,), the healthcheck command fails with:

wget: can't connect to remote host: Connection refused

The command currently is: wget -qO/dev/null http://localhost:8080

Investigation shows that the unitd is only listening on the IPv4 socket:

$ netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.11:45497        0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      10/unit: router
udp        0      0 127.0.0.11:43799        0.0.0.0:*                           -

For comparison, the nginx/php-fpm image listens on both IPv4 & 6 sockets.