Customize RabbitMQ in Docker container before launch of server

503 views
Skip to first unread message

John F

unread,
Sep 2, 2016, 5:09:10 AM9/2/16
to rabbitmq-users
I'm trying to create an entrypoint script for a Docker container that should re-configure the standard RabbitMQ setup (remove 'guest' user, add other virtual hosts, adding exchanges etc.) and then start the RabbitMQ server.

Current scenario
I have a custom standard setup RabbitMQ image (default config file, default 'guest' user etc).
I have several environments in which to be able to launch this image in, but each environment will use different setup, slightly different configurations and different certificates.
I need to create different start-scripts that can start the image as a container for a specific environment, inject custom environment variables and mount a volume containing the certificates for that environment etc.

The current entrypoint script
#!/bin/bash
exec rabbitmq-server $@

The problem
When the image is launched as a container the entrypoint script is executed and the RabbitMQ standard-setup server is launched.
I need to be able to run a 'reconfigure' script in order to reconfigure the RabbitMQ before it is being launched. The current documentation I've found shows how to install RabbitMQ and it is normally auto-launched with default configuration. However I need RabbitMQ to not be accessible (in its default setup) before it has been properly configured.
The problem for me is that if the RabbitMQ is not launched then I'm not able to reconfigure it through rabbitmqctl.

Michael Klishin

unread,
Sep 2, 2016, 5:27:44 AM9/2/16
to rabbitm...@googlegroups.com
Hi John,

Have you considered using the image from Docker Inc. or at least borrowing some ideas
from it? Just checking :)


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

John F

unread,
Sep 2, 2016, 7:16:00 AM9/2/16
to rabbitmq-users
Most stuff we've looked into automatically starts RabbitMQ and then reconfigures it. We need NOT to start RabbitMQ, but start off by reconfiguring it and then start it.
Reply all
Reply to author
Forward
0 new messages