create user in dockerfile, add start script for container
This commit is contained in:
19
mosquitto-start.sh
Executable file
19
mosquitto-start.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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 \
|
||||
-it \
|
||||
--rm \
|
||||
-p1883:1883 \
|
||||
-v $VOLUME:/opt/etc/mosquitto \
|
||||
--link mariadb \
|
||||
--name mosquitto \
|
||||
$IMAGE /bin/bash
|
||||
|
||||
|
Reference in New Issue
Block a user