1、官网下载delayed_message插件

下载地址:

http://www.rabbitmq.com/community-plugins.html

https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases


2、编辑Dockerfile:

# vim Dockerfile
From rabbitmq:3.9-management
COPY rabbitmq_delayed_message_exchange-3.9.0.ez /plugins
RUN rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange


3、构建镜像

docker build -t rabbitmq:3-management-delayed .