[systemd-devel] socket-activated containers with domain sockets

Simon Peeters peeters.simon at gmail.com
Sat May 16 07:01:22 PDT 2015


hej all.

I have a kind off weird setup using socket-activated containers:

nginx on the host listens on port 80 and has a 'proxy_pass
http://unix:/run/http/$host;' directive.

then I have webserver at .socket listening on 'ListenStream=/run/http/%I'
which in turn activates a container.

this works fine with the following 'nginx-container at .service'
[Service]
ExecStart=/usr/bin/systemd-nspawn --private-network
--bind=/srv/%i:/srv/http -D /var/lib/machines/nginx_base -x -M
"nginx_%i" /usr/bin/nginx -g 'daemon off;'

[Install]
Also=webserver@%i.socket
Alias=webserver@%i.service

witch runs a (patched) nginx as only binary in that container.

now I want to run systemd in such a container to run both nginx and nodejs.
the problem is, what should be in my 'nginx.socket' in order to pass
on that first socket systemd gets, which is a UDS outside of the
container?


greetings


Simon.


More information about the systemd-devel mailing list