mosquitto-with-auth/Dockerfile

30 lines
677 B
Docker

FROM debian:latest
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="registry.gitlab.com/wolutator/mosquitto-with-auth"
LABEL AlternativeImageName="wollud1969/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 && \
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
VOLUME /opt/etc
EXPOSE 1883/tcp
EXPOSE 8883/tcp
EXPOSE 9001/tcp
WORKDIR /opt
CMD ["env", "LD_LIBRARY_PATH=/opt/lib", "/opt/sbin/mosquitto", "-c", "/opt/etc/mosquitto/mosquitto.conf"]