use supervisord
This commit is contained in:
parent
10bb767480
commit
1d2fa96a67
5 changed files with 43 additions and 10 deletions
|
@ -11,6 +11,7 @@ RUN apt-get update && apt install -y --no-install-recommends \
|
||||||
libpam-sss \
|
libpam-sss \
|
||||||
libpam-modules \
|
libpam-modules \
|
||||||
gettext \
|
gettext \
|
||||||
|
supervisor \
|
||||||
&& apt-get autoclean \
|
&& apt-get autoclean \
|
||||||
&& apt-get autoremove \
|
&& apt-get autoremove \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
@ -34,8 +35,8 @@ COPY nsswitch.conf /etc/nsswitch.conf
|
||||||
COPY common-session /etc/pam.d/common-session
|
COPY common-session /etc/pam.d/common-session
|
||||||
COPY skel /etc/skel
|
COPY skel /etc/skel
|
||||||
|
|
||||||
COPY startup.sh /root/startup.sh
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
COPY sssd.sv.conf /etc/supervisor/conf.d/sssd.sv.conf
|
||||||
|
COPY sshd.sv.conf /etc/supervisor/conf.d/sshd.sv.conf
|
||||||
|
|
||||||
VOLUME /home
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||||
|
|
||||||
CMD ["/bin/bash", "/root/startup.sh"]
|
|
||||||
|
|
5
sshd.sv.conf
Normal file
5
sshd.sv.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[program:sshd]
|
||||||
|
command=/usr/sbin/sshd -e -D
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
redirect_stderr=true
|
14
sssd.sv.conf
Normal file
14
sssd.sv.conf
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[program:sssd_init]
|
||||||
|
command=
|
||||||
|
/bin/bash -c "envsubst < /etc/sssd/sssd.conf.env > /etc/sssd/sssd.conf; chmod 600 /etc/sssd/sssd.conf; supervisorctl start sssd"
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
redirect_stderr=true
|
||||||
|
|
||||||
|
[program:sssd]
|
||||||
|
command=/bin/bash -c "rm -rf /var/run/sssd.pid; /usr/sbin/sssd -i"
|
||||||
|
autostart=false
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
redirect_stderr=true
|
|
@ -1,6 +0,0 @@
|
||||||
envsubst < /etc/sssd/sssd.conf.env > /etc/sssd/sssd.conf
|
|
||||||
chmod 600 /etc/sssd/sssd.conf
|
|
||||||
|
|
||||||
rm -rf /var/run/sssd.pid
|
|
||||||
/usr/sbin/sssd -f
|
|
||||||
/usr/sbin/sshd -e -D
|
|
19
supervisord.conf
Normal file
19
supervisord.conf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
user=root
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
redirect_stderr=true
|
||||||
|
|
||||||
|
[unix_http_server]
|
||||||
|
file=/var/run/supervisor.sock
|
||||||
|
chmod=0700
|
||||||
|
|
||||||
|
[rpcinterface:supervisor]
|
||||||
|
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||||
|
|
||||||
|
[supervisorctl]
|
||||||
|
serverurl=unix:///var/run/supervisor.sock
|
||||||
|
|
||||||
|
[include]
|
||||||
|
files = /etc/supervisor/conf.d/*.conf
|
Loading…
Reference in a new issue