Closed srinimaroju closed 5 years ago
Hi, why do you think it doesn't support ipv4? It seems to me that nginx is listening on both ipv4 and ipv6.
root@8e120f316a4f:/# netstat -nlp | grep nginx
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 8/nginx: master pro
tcp6 0 0 :::8000 :::* LISTEN 8/nginx: master pro
On non ipv6 environments container fails to start.
docker run \ -p 8000:8000 \ --env API_HOST=api \ --env API_PORT=9000 \ --link zoonavigator-api:api \ --name zoonavigator-web \ elkozmon/zoonavigator-web:latest
2017/10/26 15:15:41 [emerg] 9#9: socket() [::]:8000 failed (97: Address family not supported by protocol) nginx: [emerg] socket() [::]:8000 failed (97: Address family not supported by protocol)
Ahh yes, you are right!
Ok so I made IPv6 binding optional via env variable _ENABLEIPV6. If not set, it will only bind to IPv4 addresses so this should fix the issue for you. This new version 0.2.3 is now available on Docker Hub.
commenting out following lines fixes the issue listen [::]:$SERVER_HTTP_PORT default_server;