Como instalar um plugin no RabbitMQ no Docker

No prompt de comando do host execute o código abaixo para entrar na linha de comando do container:

docker exec -it <nome_do_container_do_rabbitmq> bash -l

Atualize o apt-get

apt-get update &&

apt-get install -y curl unzip

Abra a pasta do plugin do rabbitmq:

cd /var/lib/rabbitmq/mnesia/rabbit@meurabbitmq-plugins-expand

Execute:

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

rabbitmq-plugins enable rabbitmq_delayed_message_exchange

rm rabbitmq_delayed_message_exchange-20171201-3.7.x.ez