Dockerfile use 'tini' init
This commit is contained in:
parent
6b997056b4
commit
5823638903
@ -3,7 +3,7 @@ MAINTAINER David Personette <dperson@gmail.com>
|
|||||||
|
|
||||||
# Install samba
|
# Install samba
|
||||||
RUN apk --no-cache --no-progress upgrade && \
|
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 && \
|
adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \
|
||||||
file="/etc/samba/smb.conf" && \
|
file="/etc/samba/smb.conf" && \
|
||||||
sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \
|
sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \
|
||||||
@ -47,4 +47,4 @@ HEALTHCHECK --interval=60s --timeout=15s \
|
|||||||
|
|
||||||
VOLUME ["/etc/samba"]
|
VOLUME ["/etc/samba"]
|
||||||
|
|
||||||
ENTRYPOINT ["samba.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
|
@ -4,7 +4,7 @@ MAINTAINER David Personette <dperson@gmail.com>
|
|||||||
# Install samba
|
# Install samba
|
||||||
RUN ["cross-build-start"]
|
RUN ["cross-build-start"]
|
||||||
RUN apk --no-cache --no-progress upgrade && \
|
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 && \
|
adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \
|
||||||
file="/etc/samba/smb.conf" && \
|
file="/etc/samba/smb.conf" && \
|
||||||
sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \
|
sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \
|
||||||
@ -49,4 +49,4 @@ HEALTHCHECK --interval=60s --timeout=15s \
|
|||||||
|
|
||||||
VOLUME ["/etc/samba"]
|
VOLUME ["/etc/samba"]
|
||||||
|
|
||||||
ENTRYPOINT ["samba.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
|
@ -4,7 +4,7 @@ MAINTAINER David Personette <dperson@gmail.com>
|
|||||||
# Install samba
|
# Install samba
|
||||||
RUN ["cross-build-start"]
|
RUN ["cross-build-start"]
|
||||||
RUN apk --no-cache --no-progress upgrade && \
|
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 && \
|
adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \
|
||||||
file="/etc/samba/smb.conf" && \
|
file="/etc/samba/smb.conf" && \
|
||||||
sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \
|
sed -i 's|^;* *\(log file = \).*| \1/dev/stdout|' $file && \
|
||||||
@ -49,4 +49,4 @@ HEALTHCHECK --interval=60s --timeout=15s \
|
|||||||
|
|
||||||
VOLUME ["/etc/samba"]
|
VOLUME ["/etc/samba"]
|
||||||
|
|
||||||
ENTRYPOINT ["samba.sh"]
|
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
|
2
samba.sh
2
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"
|
echo "Service already running, please restart container to apply changes"
|
||||||
else
|
else
|
||||||
[[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D
|
[[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D
|
||||||
ionice -c 3 smbd -FS </dev/null
|
exec ionice -c 3 smbd -FS </dev/null
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user