From 064d94581c6eb59213b837b64bc4d0e45fa2164d Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Fri, 26 Oct 2018 07:31:22 +0100 Subject: [PATCH] Remove renamed files, fix readme. --- docker/README.md | 4 +- docker/from_dist/Dockerfile | 70 --------------------------- docker/from_dist/README.md | 47 ------------------ docker/from_dist/docker-entrypoint.sh | 4 -- 4 files changed, 2 insertions(+), 123 deletions(-) delete mode 100644 docker/from_dist/Dockerfile delete mode 100644 docker/from_dist/README.md delete mode 100755 docker/from_dist/docker-entrypoint.sh diff --git a/docker/README.md b/docker/README.md index 6b8e3501..06db82b1 100644 --- a/docker/README.md +++ b/docker/README.md @@ -2,8 +2,8 @@ This directory contains Docker files for Mosquitto. -The `1.4` and `1.5` directories contain the latest version of Mosquitto for -those releases, and provide the basis of the official images. +The `1.5` directory contains the latest version of Mosquitto for +that series, and provide the basis of the official image. `1.4.12` is the version using Alpine packaged Mosquitto, which will be removed at the next minor release. diff --git a/docker/from_dist/Dockerfile b/docker/from_dist/Dockerfile deleted file mode 100644 index 3b36963d..00000000 --- a/docker/from_dist/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -FROM alpine:latest AS build - -# A released dist version, like "1.2.3" -ARG VERSION -RUN test -n "${VERSION}" - -RUN apk --no-cache add \ - build-base \ - libressl-dev \ - c-ares-dev \ - curl \ - util-linux-dev \ - libwebsockets-dev \ - libxslt \ - python2 - -# This build procedure is based on: -# https://github.com/alpinelinux/aports/blob/master/main/mosquitto/APKBUILD -# -# If this step fails, double check the version build-arg and make sure its -# a valid published tarball at https://mosquitto.org/files/source/ -RUN mkdir -p /build /install && \ - curl -SL https://mosquitto.org/files/source/mosquitto-${VERSION}.tar.gz \ - | tar --strip=1 -xzC /build && \ - make -C /build \ - WITH_MEMORY_TRACKING=no \ - WITH_WEBSOCKETS=yes \ - WITH_SRV=yes \ - WITH_TLS_PSK=no \ - WITH_ADNS=no \ - prefix=/usr \ - binary && \ - make -C /build \ - prefix=/usr \ - DESTDIR="/install" \ - install && \ - mv /install/etc/mosquitto/mosquitto.conf.example /install/etc/mosquitto/mosquitto.conf && \ - sed -i -e 's/#log_dest stderr/log_dest syslog/' /install/etc/mosquitto/mosquitto.conf - - -# Single-layer image for the mosquitto distribution -FROM alpine:latest -LABEL maintainer="Jonathan Hanson " -LABEL description="Eclipse Mosquitto MQTT Broker" - -# Install the run-time dependencies -RUN apk --no-cache add \ - busybox \ - libcrypto1.0 \ - libssl1.0 \ - libuuid \ - libwebsockets \ - musl - -# Copy over the built install from the earlier image layer -COPY --from=build /install / - -# Set up the mosquitto directories and the mosquitto user -RUN addgroup -S mosquitto 2>/dev/null && \ - adduser -S -D -H -h /var/empty -s /sbin/nologin -G mosquitto -g mosquitto mosquitto 2>/dev/null && \ - mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \ - cp /etc/mosquitto/mosquitto.conf /mosquitto/config && \ - chown -R mosquitto:mosquitto /mosquitto - -VOLUME ["/mosquitto/config", "/mosquitto/data", "/mosquitto/log"] - -# Set up the entry point script and default command -COPY docker-entrypoint.sh / -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"] diff --git a/docker/from_dist/README.md b/docker/from_dist/README.md deleted file mode 100644 index 421cb91d..00000000 --- a/docker/from_dist/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Eclipse Mosquitto Docker Image -Containers built with this Dockerfile build as source from published tarballs. - -## Mount Points -Three docker volumes have been created in the image to be used for configuration, persistent storage and logs. -``` -/mosquitto/config -/mosquitto/data -/mosquitto/log -``` - -## Configuration -When creating a container from 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 -p 9001:9001 -v :/mosquitto/config/mosquitto.conf eclipse-mosquitto: -``` - -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**: For any volume used, the data will be persistent between containers. - -## Build -Build and tag the docker image for a specific version: -``` -docker build -t eclipse-mosquitto: --build-arg VERSION="" . -``` - -## Run -Run a container using the new image: -``` -docker run -it -p 1883:1883 -p 9001:9001 -v :/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto: -``` -: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. diff --git a/docker/from_dist/docker-entrypoint.sh b/docker/from_dist/docker-entrypoint.sh deleted file mode 100755 index b381ac57..00000000 --- a/docker/from_dist/docker-entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/ash -set -e - -exec "$@"