Dockerfile better group and user creation
This commit is contained in:
parent
1f3bb70022
commit
5a4c03cfde
@ -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 && \
|
||||||
|
@ -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 && \
|
||||||
|
@ -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 && \
|
||||||
|
Loading…
Reference in New Issue
Block a user