mkdir ~/docker-mosquitto
nano ~/docker-mosquitto/mosquitto.conf
mkdir ~/docker-mosquitto/data ~/docker-mosquitto/log
docker run -d -p 53883:8883 -name brot-mqtt -v /home/brot/docker-mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf -v /home/brot/docker-mosquitto/data/:/mosquitto/data/ -v /home/brot/docker-mosquitto/log/:/mosquitto/log/ -v /home/brot/docker-mosquitto/ca.crt:/mosquitto/ca.crt -v /home/brot/docker-mosquitto/brot-mqtt.crt:/mosquitto/brot-mqtt.crt -v /home/brot/docker-mosquitto/brot-mqtt.key:/mosquitto/brot-mqtt.key eclipse-mosquitto
listener 8883
cafile /mosquitto/ca.crt
certfile /mosquitto/brot-mqtt.crt
keyfile /mosquitto/brot-mqtt.key
require_certificate true
use_identity_as_username true
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log