File tree Expand file tree Collapse file tree 3 files changed +135
-60
lines changed Expand file tree Collapse file tree 3 files changed +135
-60
lines changed Original file line number Diff line number Diff line change 1+ # supported build argument
2+ ARG MOSQUITTO_BASE=eclipse-mosquitto:latest
3+
14# Download base image
2- FROM eclipse-mosquitto:latest
5+ FROM $MOSQUITTO_BASE
6+
7+ # re-reference supported argument and copy to environment var
8+ ARG MOSQUITTO_BASE
9+ ENV MOSQUITTO_BASE=${MOSQUITTO_BASE}
310
411# see https://github.com/alpinelinux/docker-alpine/issues/98
512RUN sed -i 's/https/http/' /etc/apk/repositories
@@ -34,4 +41,13 @@ ENV IOTSTACK_ENTRY_POINT=
3441# IOTstack also declares these paths
3542VOLUME ["/mosquitto/config" , "/mosquitto/pwfile" ]
3643
44+ # set container metadata
45+ LABEL com.github.SensorsIot.IOTstack.Dockerfile.build-args="${MOSQUITTO_BASE}"
46+ LABEL com.github.SensorsIot.IOTstack.Dockerfile.based-on="https://github.com/eclipse/mosquitto"
47+
48+ # don't need these variables in the running container
49+ ENV MOSQUITTO_BASE=
50+ ENV HEALTHCHECK_SCRIPT=
51+ ENV IOTSTACK_ENTRY_POINT=
52+
3753# EOF
Original file line number Diff line number Diff line change 11mosquitto :
22 container_name : mosquitto
3- build : ./.templates/mosquitto/.
3+ build :
4+ context : ./.templates/mosquitto/.
5+ args :
6+ - MOSQUITTO_BASE=eclipse-mosquitto:latest
47 restart : unless-stopped
58 environment :
69 - TZ=Etc/UTC
You can’t perform that action at this time.
0 commit comments