Container fails to start on systems without IPv6 (or IPv4)
Nginx is hardcoded to listen on IPv6 loopback: https://0xacab.org/jvoisin/mat2-web/-/blob/master/config/nginx-default.conf#L4
If you run this container on a system without IPv6 (disabled via kernel cmdline), you get the following:
$ podman run -ti -p8181:8080 --read-only --tmpfs /tmp --tmpfs /run/uwsgi --tmpfs=/app/upload --security-opt=no-new-privileges registry.0xacab.org/jvoisin/mat2-web:latest 2020/09/22 12:42:46 [emerg] 8#8: socket() [::]:8080 failed (97: Address family not supported by protocol) nginx: [emerg] socket() [::]:8080 failed (97: Address family not supported by protocol) [uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/mat2-web.ini [...]
Though the container is running fine, as uwsgi runs and thus the main process does not exit...
Likely you get the same issue on systems without IPv4, though not sure how Line 3 of the nginx config behaves, when no IPv4 stack is present.
Maybe just listen on Line 3 (without
[::] on Line 4) would be sufficient?
Mainly recording the error here in case someone else tries to to debug the same issue.