Docker: update to 1.6.10.
Also: * Update to alpine:3.12. * Use openssl. * Enable TLS-PSK. * Remove obsolete 1.4.12 dockerfile.pull/1683/head
parent
8123e767de
commit
f39bf49f90
@ -1,14 +0,0 @@
|
||||
FROM alpine:3.6
|
||||
MAINTAINER David Audet <david.audet@ca.com>
|
||||
|
||||
LABEL Description="Eclipse Mosquitto MQTT Broker"
|
||||
|
||||
RUN apk --no-cache add mosquitto=1.4.12-r0 ca-certificates && \
|
||||
mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \
|
||||
cp /etc/mosquitto/mosquitto.conf /mosquitto/config && \
|
||||
chown -R mosquitto:mosquitto /mosquitto
|
||||
|
||||
COPY docker-entrypoint.sh /
|
||||
EXPOSE 1883
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
|
@ -1,49 +0,0 @@
|
||||
#Eclipse Mosquitto v1.4.12 Docker Image
|
||||
|
||||
##Mount Points
|
||||
|
||||
Three mount points have been created in the image to be used for configuration, persistent storage and logs.
|
||||
```
|
||||
/mosquitto/config
|
||||
/mosquitto/data
|
||||
/mosquitto/log
|
||||
```
|
||||
|
||||
|
||||
##Configuration
|
||||
|
||||
When running the image, the default configuration values are used.
|
||||
To use a custom configuration file, mount a **local** configuration file to `/mosquitto/config/mosquitto.conf`
|
||||
```
|
||||
docker run -it -p 1883:1883 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf eclipse-mosquitto:1.4.12
|
||||
```
|
||||
|
||||
Configuration can be changed to:
|
||||
|
||||
* persist data to `/mosquitto/data`
|
||||
* log to `/mosquitto/log/mosquitto.log`
|
||||
|
||||
i.e. add the following to `mosquitto.conf`:
|
||||
```
|
||||
persistence true
|
||||
persistence_location /mosquitto/data/
|
||||
|
||||
log_dest file /mosquitto/log/mosquitto.log
|
||||
```
|
||||
|
||||
**Note**: If a volume is used, the data will persist between containers.
|
||||
|
||||
##Build
|
||||
Build the image:
|
||||
```
|
||||
docker build -t eclipse-mosquitto:1.4.12 .
|
||||
```
|
||||
|
||||
##Run
|
||||
Run a container using the new image:
|
||||
```
|
||||
docker run -it -p 1883:1883 -v <path-to-configuration-file>:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto:1.4.12
|
||||
```
|
||||
:boom: if the mosquitto configuration (mosquitto.conf) was modified
|
||||
to use non-default ports, the docker run command will need to be updated
|
||||
to expose the ports that have been configured.
|
@ -1,5 +0,0 @@
|
||||
#!/bin/ash
|
||||
|
||||
set -e
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue