tcp/1883 MQTT port
tcp/9001 websocket
Run for MQTT only:
docker run -d -p 1883:1883 --name=mosquitto sourceperl/mosquitto
Run for MQTT + websocket:
docker run -d -p 1883:1883 -p 9001:9001 --name=mosquitto sourceperl/mosquitto
Link to mosquitto from another container:
docker run -d --link mosquitto:mosquitto --name=mqttwarn sourceperl/mqttwarn
git clone https://github.com/sourceperl/docker.mosquitto.git
cd docker.mosquitto
docker build -t sourceperl/mosquitto .