Closed eriksjolund closed 2 years ago
Hey @eriksjolund, thanks for this investigation.
The official image does not work because they use a entrypoint script which will overwrite the fd number 3 with a new fd, see line 7 or 9.
Bash (and some other shells) have a feature which supports automatically using a free fd, see https://unix.stackexchange.com/questions/226164/what-does-exec-fd-dev-watchdog-do-in-bash. Unfortunately these tiny container shell do not seem to support this.
So to fix this the docker-entrypoint.sh must be patched to not overwrite fd 3 and instead use a free one.
Thanks @Luap99 for finding the problem!
I created
and
(Currently this draft PR is a bit untested).
I removed the logging to FD 3 and instead wrapped the logging into a shell function, in other words, log messages are sent with
entrypoint_log "$ME: info: can not guess the operating system"
instead of
echo >&3 "$ME: info: can not guess the operating system"
I tried to run docker.io/library/nginx with rootless Podman and socket activation but it fails with the error message
[crit] 1#1: getsockname() of the inherited socket #3 failed (88: Socket operation on non-socket)
To reproduce the error message:
This diff shows the edit that was made
Run
Create ~/.config/systemd/user/nginx.socket with this contents
Start the socket and test with curl
The error message
[crit] 1#1: getsockname() of the inherited socket #3 failed (88: Socket operation on non-socket)
is shown: