How to run a socket-activated Nginx container with rootless Podman? #15354
-
How to run a socket-activated Nginx container with rootless Podman? I'm not sure this is even possible. A question is whether Nginx supports socket activation. "nginx includes an undocumented, internal socket-passing mechanism based on the NGINX environmental variable." quote from See also: (If I find out the answer to my question, I'll fill it in later) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I got a minimal demo working: https://github.com/eriksjolund/podman-nginx-socket-activation The demo shows that it is possible to run a socket-activated nginx container with rootless Podman.
Update 22 October 2022:The container image docker.io/library/nginx now supports socket activation! |
Beta Was this translation helpful? Give feedback.
-
Great stuff! 👍🏻 Have you tried flipping it around? As Podman supports systemd as init within the container, I presume it would be possible to self-contain this. |
Beta Was this translation helpful? Give feedback.
I got a minimal demo working:
https://github.com/eriksjolund/podman-nginx-socket-activation
The demo shows that it is possible to run a socket-activated nginx container with rootless Podman.
Update 22 October 2022:
The container image docker.io/library/nginx now supports socket activation!
(nginx still has no support for the systemd environment variables
LISTEN_FDS
,LISTEN_FDNAMES
,LISTEN_PID
but the environment variableNGINX
lets you combine a systemd socket unit with nginx)