I am using rabbitmq:3-management
from https://hub.docker.com/_/rabbitmq/ however, it is missing a plugin that I need rabbitmq_delayed_message_exchange
.
How can I enable this plugin if it is not available in the image?
Open a terminal, navigate to your rabbitmq-go folder and run docker-compose up . This command will pull the rabbitmq:3-management-alpine image, create the container rabbitmq and start the service and webUI. You should see something like this: Once you see this, open your browser and head over to http://localhost:15672.
/usr/lib/rabbitmq/plugins is an additional directory where nothing is installed by the RabbitMQ package itself.
If you open your Docker engine, you will see the RbbitMQ container set and running. If you open http://localhost:15672/ on a browser, you will be able to access the management Ui, and now you can log in using the docker-compose set username and password. And now you can see the RabbitMQ instance is up and running.
Assuming the Docker Desktop has been installed, we use the command docker pull rabbitmq:3-management to pull a RabbitMQ Docker image from DockerHub. After the Docker image is downloaded and saved locally, we can start a RabbitMQ container using the following command.
In this article, we will use the RabbitMQ image with a tag 3-management, which is a Docker image with the RabbitMQ management plugin installed and enabled by default. Assuming the Docker Desktop has been installed, we use the command docker pull rabbitmq:3-management to pull a RabbitMQ Docker image from DockerHub.
The files must be copied to one of the plugins directories specified by $RABBITMQ_PLUGINS_DIR. Assuming that plugins correctly specify a dependency on the core RabbitMQ server and their files were copied to the correct directory, they will show up in rabbitmq-plugins list and can be enabled with rabbitmq-plugins enable.
/usr/lib/rabbitmq/plugins is an additional directory where nothing is installed by the RabbitMQ package itself. But it is a fixed non-changing path where external plugins can be installed from Debian/RPM packages or can be put there by a provisioning tool.
FROM rabbitmq:3.7-management RUN apt-get update && \ apt-get install -y curl unzip RUN curl https://dl.bintray.com/rabbitmq/community-plugins/3.7.x/rabbitmq_delayed_message_exchange/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip > rabbitmq_delayed_message_exchange-20171201-3.7.x.zip && \ unzip rabbitmq_delayed_message_exchange-20171201-3.7.x.zip && \ rm -f rabbitmq_delayed_message_exchange-20171201-3.7.x.zip && \ mv rabbitmq_delayed_message_exchange-20171201-3.7.x.ez plugins/ RUN rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Just updating the accepted answer. You may copy the downloaded plugin into rabbitmq image and install it.
Plugin download link: https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases
1. Prepare custom image:
Dockerfile
FROM rabbitmq:3.7.18-management COPY ./rabbitmq_delayed_message_exchange-20171201-3.7.x.ez /opt/rabbitmq/plugins/ RUN rabbitmq-plugins enable rabbitmq_delayed_message_exchange
docker-compose.yml
rabbitmq: image: rabbitmq-custom ports: - "5672:5672" - "15672:15672"
2. Build the image
docker build -t rabbitmq-custom .
3. Run the docker composer:
docker-compose up
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With