From bb047e9823bef3c5156ddd34ff905f84a44c5a48 Mon Sep 17 00:00:00 2001 From: Fredrik Wikestad Date: Fri, 9 Feb 2024 15:13:35 +0100 Subject: [PATCH] Customize to use volumes for cert --- Dockerfile | 10 +++++++--- mosquitto.conf | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index fb9e298..f317392 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,11 @@ RUN \ EXPOSE 1883 EXPOSE 8883 COPY ./mosquitto.conf /mosquitto.conf -COPY --chown=mosquitto:mosquitto ./CA.crt /CA.crt -COPY --chown=mosquitto:mosquitto ./server.crt /server.crt -COPY --chown=mosquitto:mosquitto ./server.key /server.key + +VOLUME [ "/etc/cert" ] + +#COPY --chown=mosquitto:mosquitto ./CA.crt /CA.crt +#COPY --chown=mosquitto:mosquitto ./server.crt /server.crt +#COPY --chown=mosquitto:mosquitto ./server.key /server.key + CMD [ "mosquitto", "-c", "/mosquitto.conf"] \ No newline at end of file diff --git a/mosquitto.conf b/mosquitto.conf index f3dec4e..fbbe288 100644 --- a/mosquitto.conf +++ b/mosquitto.conf @@ -6,6 +6,6 @@ listener 1883 # TLS listener 8883 tls_keyform pem -cafile /CA.crt -certfile /server.crt -keyfile /server.key \ No newline at end of file +#cafile /CA.crt +certfile /etc/cert/mqtt.academy.nordicsemi.com/fullchain.pem +keyfile /etc/cert/mqtt.academy.nordicsemi.com/privkey.pem \ No newline at end of file