5487395fb6
* Adding Dockerfiles to build versioned Docker images Dockerfiles have been added to create Docker images for Mosquitto v1.4.4 and v1.4.8 using Alpine Linux as a base. Different directories have been added for each version to decouple the configuration and entrypoint scripts. Currently they contain the same content, but this could change in the future. Docker Hub will also need to pull from specific directories when official docker images will be built and hosted on Docker Hub. * Removing unnecessary default config and volumes Mount points are created in the image, but volumes are not automatically created. The user can still create volumes for these mount points, but is not required to. The default configuration file is now copied from /etc/mosquitto/mosquitto.conf to /mosquitto/config/mosquitto.conf. The user can override this file by mounting a local configuration file to /mosquitto/config. Signed-off-by: David Audet <david.audet@ca.com>
14 lines
475 B
Docker
14 lines
475 B
Docker
FROM alpine:3.3
|
|
MAINTAINER David Audet <david.audet@ca.com>
|
|
|
|
LABEL Description="Eclipse Mosquitto MQTT Broker"
|
|
|
|
RUN apk --no-cache --update add mosquitto=1.4.4-r0 && \
|
|
mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \
|
|
cp /etc/mosquitto/mosquitto.conf /mosquitto/config && \
|
|
chown -R mosquitto:mosquitto /mosquitto
|
|
|
|
COPY docker-entrypoint.sh /
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
|