marcoratto/mosquitto

By marcoratto

Updated about 1 year ago

Broker MQTT Mosquitto

Image
Message queues
0

286

marcoratto/mosquitto repository overview

1. Download image

docker pull marcoratto/mosquitto:latest

2. Create passwd file

docker run --rm -it -v "$PWD:/mosquitto/config" marcoratto/mosquitto:latest mosquitto_passwd -c /mosquitto/config/passwd mqtt

Password: ********

Reenter password: **********

3. Run the image

docker run -d --name mosquitto -p 1883:1883 -v ./passwd:/mosquitto/config/passwd marcoratto/mosquitto:latest

4. Subscribe to the broker

mosquitto_sub -h 127.0.0.1 -p 1883 -i 1 -u mqtt -P password -c -q 1 -t "test/mosquitto" -d

5. Publish a message on the broker

mosquitto_pub -h 127.0.0.1 -p 1883 -u mqtt -P password -i 2 -q 1 -t "test/mosquitto" -m "Hello world"

Tag summary

Content type

Image

Digest

sha256:7f28e50b4

Size

4.7 MB

Last updated

about 1 year ago

docker pull marcoratto/mosquitto