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