From 582363890397f755a011d8860fc7c159e81ad4f6 Mon Sep 17 00:00:00 2001 From: David Personette Date: Tue, 10 Apr 2018 09:58:16 -0400 Subject: [PATCH] Dockerfile use 'tini' init --- Dockerfile | 4 ++-- Dockerfile.aarch64 | 4 ++-- Dockerfile.armhf | 4 ++-- samba.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0cd3c9..e0dcdf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER David Personette # Install samba RUN apk --no-cache --no-progress upgrade && \ - apk --no-cache --no-progress add bash samba shadow && \ + apk --no-cache --no-progress add bash samba shadow tini && \ adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \ file="/etc/samba/smb.conf" && \ sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \ @@ -47,4 +47,4 @@ HEALTHCHECK --interval=60s --timeout=15s \ VOLUME ["/etc/samba"] -ENTRYPOINT ["samba.sh"] \ No newline at end of file +ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"] \ No newline at end of file diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 549b9f2..2cda3a1 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -4,7 +4,7 @@ MAINTAINER David Personette # Install samba RUN ["cross-build-start"] RUN apk --no-cache --no-progress upgrade && \ - apk --no-cache --no-progress add bash samba shadow && \ + apk --no-cache --no-progress add bash samba shadow tini && \ adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \ file="/etc/samba/smb.conf" && \ sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \ @@ -49,4 +49,4 @@ HEALTHCHECK --interval=60s --timeout=15s \ VOLUME ["/etc/samba"] -ENTRYPOINT ["samba.sh"] \ No newline at end of file +ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"] \ No newline at end of file diff --git a/Dockerfile.armhf b/Dockerfile.armhf index d3e0277..a7f2160 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -4,7 +4,7 @@ MAINTAINER David Personette # Install samba RUN ["cross-build-start"] RUN apk --no-cache --no-progress upgrade && \ - apk --no-cache --no-progress add bash samba shadow && \ + apk --no-cache --no-progress add bash samba shadow tini && \ adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \ file="/etc/samba/smb.conf" && \ sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \ @@ -49,4 +49,4 @@ HEALTHCHECK --interval=60s --timeout=15s \ VOLUME ["/etc/samba"] -ENTRYPOINT ["samba.sh"] \ No newline at end of file +ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"] \ No newline at end of file diff --git a/samba.sh b/samba.sh index 9d09b3d..d8d1800 100755 --- a/samba.sh +++ b/samba.sh @@ -242,5 +242,5 @@ elif ps -ef | egrep -v grep | grep -q smbd; then echo "Service already running, please restart container to apply changes" else [[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D - ionice -c 3 smbd -FS