Skip to content

Instantly share code, notes, and snippets.

@declanbyrd
Last active March 8, 2021 13:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save declanbyrd/620f53511e45005a44cc53a80d62820f to your computer and use it in GitHub Desktop.
Save declanbyrd/620f53511e45005a44cc53a80d62820f to your computer and use it in GitHub Desktop.
Dockerfile to create a Websocket enabled Mosquitto MQTT broker
FROM eclipse-mosquitto:latest
RUN mkdir -p /mosquitto/data
COPY mosquitto.conf /mosquitto/config/mosquitto.conf
VOLUME /mosquitto/data
## Logging
log_dest stdout
log_type error
log_type warning
log_type notice
log_type information
## MQTT Listener
listener 1883
protocol mqtt
## WebSockets Listener
listener 9001
protocol websockets
## Persistence
persistence false
## Authorisation
allow_anonymous true
@cinkpen
Copy link

cinkpen commented Mar 5, 2021

Very useful - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment