Rabbitmq: Way to enable MQTT plugin

Created on 2 Oct 2015  路  12Comments  路  Source: docker-library/rabbitmq

It would be very handy if you would offer a way to enable the plugin without
customizing the image. For example with an env var RABBITMQ_PLUGINS="mqtt, ..." for example.
This would prevent ppl. from building custom images over and over again.
Is that possible?

question

Most helpful comment

I had the same issue
to enable plugins mount file "enabled_plugins" in path /etc/rabbitmq/enabled_plugins

so command will look like

docker run -v /path/to/conf/enabled_plugins:/etc/rabbitmq/enabled_plugins rabbitmq ...

content of the file as below [rabbitmq_management,rabbitmq_management_agent,rabbitmq_management_visualiser,rabbitmq_shovel_management,rabbitmq_stomp,rabbitmq_mqtt,rabbitmq_web_stomp,rabbitmq_web_mqtt].

All 12 comments

I have implemented this. Only issue I had was that some plugins need additional config setup which can also be done through environment variables (not very clean) and potentially through a config file passed to the entrypoint at the time of starting the container. If maintainers are interested I can make a pull request.

Same approach can be expanded to potentially do clustering, etc.

I vote for a single variable that points to a config file. It would be both easier to use and as forward compatible as possible.

I think this is a good approach. However to do this without having to alter the docker image, how should we make that file accessible inside the image? Is that possible without having a fixed volume mount?

If a config file is required then the only way is a volume. I don't know about configuring MQTT plugin but I know other docker images that expose a lot of env variables. It's a trade-off, maintainer should decide I think.

You can bind mount a single file docker run -v /path/to/conf/file.config:/etc/rabbitmq/rabbitmq.config rabbitmq ..., which would override the default config that the Dockerfile provides.

We are open to pull requests. If there are plugins that just need to be enabled through switching it on, it seems that an env would be simple enough to have the entrypoint echo the appropriate stuff into the config file. Or we can just update the documentation to show users how to use a custom config.

What is the status here. Should pull requests be submitted? I would like to enable the shovel.

+1

+1

+1

I had the same issue
to enable plugins mount file "enabled_plugins" in path /etc/rabbitmq/enabled_plugins

so command will look like

docker run -v /path/to/conf/enabled_plugins:/etc/rabbitmq/enabled_plugins rabbitmq ...

content of the file as below [rabbitmq_management,rabbitmq_management_agent,rabbitmq_management_visualiser,rabbitmq_shovel_management,rabbitmq_stomp,rabbitmq_mqtt,rabbitmq_web_stomp,rabbitmq_web_mqtt].

Since this question looks answered by https://github.com/docker-library/rabbitmq/issues/44#issuecomment-304443750, I'm going to close the issue.

If you believe this to be in error then let me know and I'll re-open it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aram535 picture aram535  路  4Comments

LanceGG picture LanceGG  路  5Comments

ghost picture ghost  路  4Comments

w7089 picture w7089  路  4Comments

CVTJNII picture CVTJNII  路  4Comments