Dockerfile better group and user creation

This commit is contained in:
David Personette 2019-08-28 20:35:30 -04:00
parent 1f3bb70022
commit 5a4c03cfde
3 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,8 @@ 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 tini && \ apk --no-cache --no-progress add bash samba shadow tini && \
adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \ addgroup -S smb && \
adduser -S -D -H -h /tmp -s /sbin/nologin -G smb -g 'Samba User' 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 && \
sed -i 's|^;* *\(load printers = \).*| \1no|' $file && \ sed -i 's|^;* *\(load printers = \).*| \1no|' $file && \

View File

@ -5,7 +5,8 @@ MAINTAINER David Personette <dperson@gmail.com>
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 tini && \ apk --no-cache --no-progress add bash samba shadow tini && \
adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \ addgroup -S smb && \
adduser -S -D -H -h /tmp -s /sbin/nologin -G smb -g 'Samba User' 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 && \
sed -i 's|^;* *\(load printers = \).*| \1no|' $file && \ sed -i 's|^;* *\(load printers = \).*| \1no|' $file && \

View File

@ -5,7 +5,8 @@ MAINTAINER David Personette <dperson@gmail.com>
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 tini && \ apk --no-cache --no-progress add bash samba shadow tini && \
adduser -D -G users -H -S -g 'Samba User' -h /tmp smbuser && \ addgroup -S smb && \
adduser -S -D -H -h /tmp -s /sbin/nologin -G smb -g 'Samba User' 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 && \
sed -i 's|^;* *\(load printers = \).*| \1no|' $file && \ sed -i 's|^;* *\(load printers = \).*| \1no|' $file && \