Sign inSign up

janvda/eclipse-mosquitto

By janvda

Updated over 2 years ago

Image
0

702

janvda/eclipse-mosquitto repository overview

eclipse-mosquitto

An MQTT broker with no security. So any MQTT client can connect to this MQTT broker for publishing MQTT messages and subscribing to MQTT messages.

This MQTT broker is listening to port 1883 and websocket port 8080

It is also possible to specify environment variables in the configuration file as specified in next section.

mosquitto.conf.env

Instead of using configuration file:

  • /mosquitto/config/mosquitto.conf

you can also use the following configuration file that supports environment variables.

  • /mosquitto/config/mosquitto.conf.env

So when this file is specified then at startup of the container it will first create a /mosquitto/config/mosquitto.conf by substituting all environment variables in this file having the format ($ENV_VARIABLE or ${ENV_VARIABLE}) by using the command envsubst

GitHub location

janvda/eclipse-mosquitto

Note that is based on the docker hub image eclipse-mosquitto (github repository eclipse/mosquitto)

docker-compose example

version: "3.9"
services:
  mqtt:
    image: janvda/eclipse-mosquitto:2.1.0
    ports:
      # following line exposes port 1883 (=the port of the MQTT broker) to host port 8101
      - "8101:1883"
      # following line exposes websocket port 8080 (=the websocket port of the MQTT broker) to host port 8102
      - "8102:8080"

Change History

  • version 2.1.0 : enabled websockets (port 8080)
  • version 2.0.0 : used image eclipse-mosquitto:2.0.18 and supports `/mosquitto/config/mosquitto.conf.env`` containing environment variables
  • version 1.0.1 : should be same as version 1.0.0 - it is just a more recent build of same docker image.

Tag summary

Content type

Image

Digest

sha256:3f501d876

Size

7.9 MB

Last updated

over 2 years ago

docker pull janvda/eclipse-mosquitto:2.1.0