mosquitto-with-auth/mosquitto-start.sh

22 lines
358 B
Bash
Executable File

#!/bin/bash
IMAGE=registry.gitlab.com/wolutator/mosquitto-with-auth:latest
VOLUME=mosquitto-config
docker volume inspect $VOLUME > /dev/null || docker volume create $VOLUME
docker pull $IMAGE
docker run \
-d \
--rm \
-p1883:1883 \
-p8883:8883 \
-p9001:9001 \
-v $VOLUME:/opt/etc/mosquitto \
--link mariadb \
--name mosquitto \
$IMAGE