File tree 7 files changed +41
-29
lines changed
7 files changed +41
-29
lines changed Original file line number Diff line number Diff line change
1
+ # Download base image
2
+ FROM eclipse-mosquitto:latest
3
+
4
+ # Add support tools
5
+ RUN apk update && apk add --no-cache rsync tzdata
6
+
7
+ # where IOTstack template files are stored
8
+ ENV IOTSTACK_DEFAULTS_DIR="iotstack_defaults"
9
+
10
+ # copy template files to image
11
+ COPY --chown=mosquitto:mosquitto ${IOTSTACK_DEFAULTS_DIR} /${IOTSTACK_DEFAULTS_DIR}
12
+
13
+ # replace the docker entry-point script
14
+ ENV IOTSTACK_ENTRY_POINT="docker-entrypoint.sh"
15
+ COPY ${IOTSTACK_ENTRY_POINT} /${IOTSTACK_ENTRY_POINT}
16
+ RUN chmod 755 /${IOTSTACK_ENTRY_POINT}
17
+ ENV IOTSTACK_ENTRY_POINT=
18
+
19
+ # IOTstack also declares these paths
20
+ VOLUME ["/mosquitto/config" , "/mosquitto/pwfile" ]
21
+
22
+ # EOF
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/ash
2
+ set -e
3
+
4
+ # Set permissions
5
+ user=" $( id -u) "
6
+ if [ " $user " = ' 0' -a -d " /mosquitto" ]; then
7
+
8
+ rsync -arp --ignore-existing /${IOTSTACK_DEFAULTS_DIR} / " /mosquitto"
9
+
10
+ chown -R mosquitto:mosquitto /mosquitto
11
+
12
+ fi
13
+
14
+ exec " $@ "
15
+
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
mosquitto :
2
2
container_name : mosquitto
3
- image : eclipse- mosquitto
3
+ build : ./.templates/ mosquitto/.
4
4
restart : unless-stopped
5
- user : " 1883"
5
+ environment :
6
+ - TZ=Etc/UTC
6
7
ports :
7
8
- " 1883:1883"
8
9
volumes :
10
+ - ./volumes/mosquitto/config:/mosquitto/config
9
11
- ./volumes/mosquitto/data:/mosquitto/data
10
12
- ./volumes/mosquitto/log:/mosquitto/log
11
13
- ./volumes/mosquitto/pwfile:/mosquitto/pwfile
12
- - ./services/mosquitto:/mosquitto/config:ro
You can’t perform that action at this time.
0 commit comments