Make docker uid/gid explicit.

Closes #1034. Thanks to Daniele Sluijters.
pull/1077/head
Roger A. Light 7 years ago
parent 9df80cfab1
commit 8509dde342

@ -67,8 +67,8 @@ RUN set -x && \
WITH_WEBSOCKETS=yes \ WITH_WEBSOCKETS=yes \
prefix=/usr \ prefix=/usr \
binary && \ binary && \
addgroup -S mosquitto 2>/dev/null && \ addgroup -S -g 1883 mosquitto 2>/dev/null && \
adduser -S -D -H -h /var/empty -s /sbin/nologin -G mosquitto -g mosquitto mosquitto 2>/dev/null && \ adduser -S -u 1883 -D -H -h /var/empty -s /sbin/nologin -G mosquitto -g mosquitto mosquitto 2>/dev/null && \
mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \ mkdir -p /mosquitto/config /mosquitto/data /mosquitto/log && \
install -d /usr/sbin/ && \ install -d /usr/sbin/ && \
install -s -m755 /build/mosq/src/mosquitto /usr/sbin/mosquitto && \ install -s -m755 /build/mosq/src/mosquitto /usr/sbin/mosquitto && \

@ -13,6 +13,11 @@ Two docker volumes have been created in the image to be used for persistent stor
/mosquitto/log /mosquitto/log
``` ```
## User/Group
The image runs mosqutto under the mosquitto user and group, which are created
with a uid and gid of 1883.
## Configuration ## Configuration
When creating a container from the image, the default configuration values are used. 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` To use a custom configuration file, mount a **local** configuration file to `/mosquitto/config/mosquitto.conf`

Loading…
Cancel
Save