Skip to content

Commit 95ea3e8

Browse files
authored
Replace supervisord with s6 (#4)
* Replace supervisord with s6 * Fix build and pre-run scripts * Remove accidentally-committed old supervisord conf * apt-get install --no-install-recommends
1 parent bef589e commit 95ea3e8

File tree

9 files changed

+19
-26
lines changed

9 files changed

+19
-26
lines changed

.docker/build

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e
44
set -x
55
export DEBIAN_FRONTEND=noninteractive
66

77
apt-get update
8-
apt-get install -y \
8+
apt-get install -y --no-install-recommends \
99
vsftpd \
10-
supervisor \
10+
s6 \
1111
nginx \
1212
php-fpm \
1313
php-gd \
@@ -16,12 +16,11 @@ apt-get install -y \
1616
graphicsmagick \
1717
ffmpeg
1818
apt-get clean
19+
rm -rf /var/lib/apt/lists/*
20+
1921
cp -L /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2022
mkdir -p /var/run/sshd \
2123
/var/run/vsftpd/empty \
2224
/run/php
2325

24-
apt-get clean
25-
rm -rf /var/lib/apt/lists/*
26-
2726
echo "session required pam_exec.so /opt/init_home.sh" >> /etc/pam.d/common-session

.docker/pre-run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
if [[ $HAVE_INITIALIZED == false ]]; then
24
useradd -m $PRIVATE_USERNAME -d /srv/ftp
35
gpasswd -a $PRIVATE_USERNAME ftp

.docker/rootfs/etc/s6/nginx/run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec nginx -g 'daemon off;'

.docker/rootfs/etc/s6/nslcd/run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec /usr/sbin/nslcd -n

.docker/rootfs/etc/s6/php-fpm/run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec /usr/sbin/php-fpm8.2 --nodaemonize --fpm-config /etc/php/8.2/fpm/php-fpm.conf

.docker/rootfs/etc/s6/sftp/run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec /usr/sbin/sshd -D -e

.docker/rootfs/etc/s6/vsftpd/run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

.docker/rootfs/etc/supervisor/conf.d/supervisord.conf

Lines changed: 0 additions & 17 deletions
This file was deleted.

.docker/run

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
#!/bin/bash
2-
3-
exec /usr/bin/supervisord
1+
#!/bin/sh
2+
exec /usr/bin/s6-svscan /etc/s6

0 commit comments

Comments
 (0)