create user in dockerfile, add start script for container
This commit is contained in:
@ -3,9 +3,16 @@ FROM debian:latest
|
||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||
LABEL ImageName="registry.gitlab.com/wolutator/mosquitto-with-auth"
|
||||
|
||||
ARG MOSQ_USER="mosquitto"
|
||||
ARG MOSQ_UID="1883"
|
||||
ARG MOSQ_GID="1883"
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y mariadb-client openssl libwebsockets8
|
||||
apt install -y mariadb-client openssl libwebsockets8 && \
|
||||
groupadd -r -g $MOSQ_GID $MOSQ_USER && \
|
||||
useradd -m -r -u $MOSQ_UID -g $MOSQ_USER $MOSQ_USER
|
||||
|
||||
|
||||
COPY opt/ /opt
|
||||
COPY etc/ /opt/etc
|
||||
|
Reference in New Issue
Block a user