From 679609469101dd6077a2ca2c98135bbf60dc972e Mon Sep 17 00:00:00 2001 From: dragonflylee Date: Mon, 8 May 2023 13:50:03 +0800 Subject: [PATCH] update dockerfile --- Dockerfile | 6 +++--- Dockerfile.aarch64 | 6 +++--- Dockerfile.armhf | 6 +++--- samba.sh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0e1311..3bfe34c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM alpine MAINTAINER David Personette # 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"] \ No newline at end of file diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index dfe2ac5..94c756f 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -3,7 +3,8 @@ COPY qemu-aarch64-static /usr/bin/ MAINTAINER David Personette # 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"] \ No newline at end of file diff --git a/Dockerfile.armhf b/Dockerfile.armhf index d6c77cf..2cbb9d3 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -3,7 +3,8 @@ COPY qemu-arm-static /usr/bin/ MAINTAINER David Personette # 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"] \ No newline at end of file diff --git a/samba.sh b/samba.sh index ebb4e20..c689804 100755 --- a/samba.sh +++ b/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