update dockerfile
This commit is contained in:
@@ -2,7 +2,8 @@ FROM alpine
|
||||
MAINTAINER David Personette <dperson@gmail.com>
|
||||
|
||||
# Install samba
|
||||
RUN apk --no-cache --no-progress upgrade && \
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk --no-cache --no-progress upgrade && \
|
||||
apk --no-cache --no-progress add bash samba shadow tini tzdata && \
|
||||
addgroup -S smb && \
|
||||
adduser -S -D -H -h /tmp -s /sbin/nologin -G smb -g 'Samba User' smbuser &&\
|
||||
@@ -62,7 +63,6 @@ EXPOSE 137/udp 138/udp 139 445
|
||||
HEALTHCHECK --interval=60s --timeout=15s \
|
||||
CMD smbclient -L \\localhost -U % -m SMB3
|
||||
|
||||
VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\
|
||||
"/run/samba"]
|
||||
VOLUME ["/var/cache/samba", "/var/lib/samba", "/var/log/samba", "/run/samba"]
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
|
||||
@@ -3,7 +3,8 @@ COPY qemu-aarch64-static /usr/bin/
|
||||
MAINTAINER David Personette <dperson@gmail.com>
|
||||
|
||||
# Install samba
|
||||
RUN apk --no-cache --no-progress upgrade && \
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk --no-cache --no-progress upgrade && \
|
||||
apk --no-cache --no-progress add bash samba shadow tini tzdata && \
|
||||
addgroup -S smb && \
|
||||
adduser -S -D -H -h /tmp -s /sbin/nologin -G smb -g 'Samba User' smbuser &&\
|
||||
@@ -63,7 +64,6 @@ EXPOSE 137/udp 138/udp 139 445
|
||||
HEALTHCHECK --interval=60s --timeout=15s \
|
||||
CMD smbclient -L \\localhost -U % -m SMB3
|
||||
|
||||
VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\
|
||||
"/run/samba"]
|
||||
VOLUME ["/var/cache/samba", "/var/lib/samba", "/var/log/samba", "/run/samba"]
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
|
||||
@@ -3,7 +3,8 @@ COPY qemu-arm-static /usr/bin/
|
||||
MAINTAINER David Personette <dperson@gmail.com>
|
||||
|
||||
# Install samba
|
||||
RUN apk --no-cache --no-progress upgrade && \
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk --no-cache --no-progress upgrade && \
|
||||
apk --no-cache --no-progress add bash samba shadow tini tzdata && \
|
||||
addgroup -S smb && \
|
||||
adduser -S -D -H -h /tmp -s /sbin/nologin -G smb -g 'Samba User' smbuser &&\
|
||||
@@ -63,7 +64,6 @@ EXPOSE 137/udp 138/udp 139 445
|
||||
HEALTHCHECK --interval=60s --timeout=15s \
|
||||
CMD smbclient -L \\localhost -U % -m SMB3
|
||||
|
||||
VOLUME ["/etc", "/var/cache/samba", "/var/lib/samba", "/var/log/samba",\
|
||||
"/run/samba"]
|
||||
VOLUME ["/var/cache/samba", "/var/lib/samba", "/var/log/samba", "/run/samba"]
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/samba.sh"]
|
||||
2
samba.sh
2
samba.sh
@@ -293,5 +293,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
|
||||
exec ionice -c 3 smbd -FS --no-process-group </dev/null
|
||||
exec ionice -c 3 smbd -F --no-process-group </dev/null
|
||||
fi
|
||||
Reference in New Issue
Block a user