Coder Social home page Coder Social logo

docker-mosquitto's Introduction

Dear Reader ๐Ÿ“–

I am slowly migrating all my docker-related work to an organisation, whalimeter

  • ๐Ÿ—ž I seldom update my blog
  • ๐Ÿ›  I often create or update private OSS projects here, at bitbucket and gitlab
  • ๐Ÿ’ฐ I sometimes create or update corporate OSS projects, formerly at Yanzi, HealthIntegrator and Mitigram, now at GpsGate
  • ๐Ÿ’– I have a special love for the misunderstood Tcl
  • ๐Ÿš Lately I have focused on POSIX shell to better target the embedded and devops spaces
  • ๐Ÿณ I have a gist that, from a running container, prints out the command-line docker command to create it.
  • ๐Ÿ‹ I have a script to rebase a slim Docker image on top of another one without changing its original configuration.
  • ๐Ÿข I am always open for opportunities in the beautiful Stockholm, or remote. But I am enjoying my time at GpsGate.

docker-mosquitto's People

Contributors

efrecon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-mosquitto's Issues

Updates?

This is a great idea and a sound implementation but it's not been updated since May. Is it still maintained?

config backup file issue

Hi,
Thanks for this customisable docker image.

So everything works fine for the first time container creation and run (using the mentioned docker-compose file). However, starting the container results in the following error:

mosquitto_1 | Keeping backup at /mosquitto/config/mosquitto.conf.bak

mosquitto_1 | error renaming "/mosquitto/config/mosquitto.conf" to "/mosquitto/config/mosquitto.conf.bak": file already exists

Furthermore, any examples for the security property with the TLS certificate can be quite helpful. Cheers

Docker Hub Latest image doesn't point at 2.15

Hey,

Thanks for making Mosquitto work with environment variables. Much less pain.

I notice that efrecon/mosquitto:latest on dockerhub is pointing at version 1.6.8 which is quite old.

I can see there is a tag for 2.15 however it seems to be broken. It complains it can't write a PID file and there are a bunch of missing sections of config.

[docker-entrypoint] [info] [20230304-231946] Environment resolution in section configuration at /mosquitto/config/sections/logging.conf
[docker-entrypoint] [info] [20230304-231946] Configuring 'log_dest' from env: stderr
[docker-entrypoint] [info] [20230304-231946] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231946] Configuring 'autosave_interval' from env: 100
[docker-entrypoint] [info] [20230304-231946] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231946] Configuring 'persistence_location' from env: /mosquitto/data/
[docker-entrypoint] [info] [20230304-231946] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231946] Configuring 'persistence' from env: true
[docker-entrypoint] [info] [20230304-231946] PID file at /var/run/mosquitto.pid
[docker-entrypoint] [WARN] [20230304-231946] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231946] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231946] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231946] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [info] [20230304-231946] Running: /usr/sbin/mosquitto
1677971986: Loading config file /mosquitto/config/sections/bridges.conf
1677971986: Loading config file /mosquitto/config/sections/logging.conf
1677971986: Loading config file /mosquitto/config/sections/persistence.conf
1677971986: Loading config file /mosquitto/config/sections/security.conf
1677971986: Error: Unable to write pid file.
[docker-entrypoint] [info] [20230304-231948] Environment resolution in main configuration at /mosquitto/config/mosquitto.conf
[docker-entrypoint] [info] [20230304-231948] Configuring 'include_dir' from env: /mosquitto/config/sections
Looking for inclusion directory in /mosquitto/config/mosquitto.conf
[docker-entrypoint] [info] [20230304-231948] Slicing /mosquitto/config/mosquitto.conf to sections at /mosquitto/config/sections
Looking for inclusion directory in /mosquitto/config/mosquitto.conf
Keeping backup at /mosquitto/config/mosquitto.conf.bak
[docker-entrypoint] [info] [20230304-231948] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231948] Configuring 'autosave_on_changes' from env: true
[docker-entrypoint] [info] [20230304-231948] Environment resolution in section configuration at /mosquitto/config/sections/logging.conf
[docker-entrypoint] [info] [20230304-231948] Configuring 'log_dest' from env: stderr
[docker-entrypoint] [info] [20230304-231948] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231948] Configuring 'autosave_interval' from env: 100
[docker-entrypoint] [info] [20230304-231948] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231948] Configuring 'persistence_location' from env: /mosquitto/data/
[docker-entrypoint] [info] [20230304-231948] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231948] Configuring 'persistence' from env: true
[docker-entrypoint] [info] [20230304-231948] PID file at /var/run/mosquitto.pid
[docker-entrypoint] [WARN] [20230304-231948] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231948] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231948] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231948] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [info] [20230304-231948] Running: /usr/sbin/mosquitto
1677971988: Loading config file /mosquitto/config/sections/bridges.conf
1677971988: Loading config file /mosquitto/config/sections/logging.conf
1677971988: Loading config file /mosquitto/config/sections/persistence.conf
1677971988: Loading config file /mosquitto/config/sections/security.conf
1677971988: Error: Unable to write pid file.
[docker-entrypoint] [info] [20230304-231952] Environment resolution in main configuration at /mosquitto/config/mosquitto.conf
[docker-entrypoint] [info] [20230304-231952] Configuring 'include_dir' from env: /mosquitto/config/sections
Looking for inclusion directory in /mosquitto/config/mosquitto.conf
[docker-entrypoint] [info] [20230304-231952] Slicing /mosquitto/config/mosquitto.conf to sections at /mosquitto/config/sections
Looking for inclusion directory in /mosquitto/config/mosquitto.conf
Keeping backup at /mosquitto/config/mosquitto.conf.bak
[docker-entrypoint] [info] [20230304-231952] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231952] Configuring 'autosave_on_changes' from env: true
[docker-entrypoint] [info] [20230304-231952] Environment resolution in section configuration at /mosquitto/config/sections/logging.conf
[docker-entrypoint] [info] [20230304-231952] Configuring 'log_dest' from env: stderr
[docker-entrypoint] [info] [20230304-231952] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231952] Configuring 'autosave_interval' from env: 100
[docker-entrypoint] [info] [20230304-231952] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231952] Configuring 'persistence_location' from env: /mosquitto/data/
[docker-entrypoint] [info] [20230304-231952] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231952] Configuring 'persistence' from env: true
[docker-entrypoint] [info] [20230304-231952] PID file at /var/run/mosquitto.pid
[docker-entrypoint] [WARN] [20230304-231952] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231952] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231952] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231952] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [info] [20230304-231952] Running: /usr/sbin/mosquitto
1677971992: Loading config file /mosquitto/config/sections/bridges.conf
1677971992: Loading config file /mosquitto/config/sections/logging.conf
1677971992: Loading config file /mosquitto/config/sections/persistence.conf
1677971992: Loading config file /mosquitto/config/sections/security.conf
1677971992: Error: Unable to write pid file.
[docker-entrypoint] [info] [20230304-231959] Environment resolution in main configuration at /mosquitto/config/mosquitto.conf
[docker-entrypoint] [info] [20230304-231959] Configuring 'include_dir' from env: /mosquitto/config/sections
Looking for inclusion directory in /mosquitto/config/mosquitto.conf
[docker-entrypoint] [info] [20230304-231959] Slicing /mosquitto/config/mosquitto.conf to sections at /mosquitto/config/sections
Looking for inclusion directory in /mosquitto/config/mosquitto.conf
Keeping backup at /mosquitto/config/mosquitto.conf.bak
[docker-entrypoint] [info] [20230304-231959] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231959] Configuring 'autosave_on_changes' from env: true
[docker-entrypoint] [info] [20230304-231959] Environment resolution in section configuration at /mosquitto/config/sections/logging.conf
[docker-entrypoint] [info] [20230304-231959] Configuring 'log_dest' from env: stderr
[docker-entrypoint] [info] [20230304-231959] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231959] Configuring 'autosave_interval' from env: 100
[docker-entrypoint] [info] [20230304-231959] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231959] Configuring 'persistence_location' from env: /mosquitto/data/
[docker-entrypoint] [info] [20230304-231959] Environment resolution in section configuration at /mosquitto/config/sections/persistence.conf
[docker-entrypoint] [info] [20230304-231959] Configuring 'persistence' from env: true
[docker-entrypoint] [info] [20230304-231959] PID file at /var/run/mosquitto.pid
[docker-entrypoint] [WARN] [20230304-231959] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231959] Section default does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231959] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [WARN] [20230304-231959] Section extra does not exist under /mosquitto/config/sections
[docker-entrypoint] [info] [20230304-231959] Running: /usr/sbin/mosquitto
1677971999: Loading config file /mosquitto/config/sections/bridges.conf
1677971999: Loading config file /mosquitto/config/sections/logging.conf
1677971999: Loading config file /mosquitto/config/sections/persistence.conf
1677971999: Loading config file /mosquitto/config/sections/security.conf
1677971999: Error: Unable to write pid file.

Break down main configuration file

The syntax of the configuration file contains implicit sections that are marked by leading comments similar to the following one (for bridges).

# =================================================================
# Bridges
# =================================================================

Given that the default listener and other extra listeners share most options, the current implementation will end up changing options at the wrong place, resulting in errors.

A way to alleviate this would be to recognise variables which names is MOSQUITTO__BRIDGES__xxx (note the double underscore) as pointing into a file called bridges.conf in the same directory, a directory that needs to be included in the main file.

arm64 containers?

Are there any plans to build arm64 containers as well as the current amd64?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.