我使用Follow Docker文件为RabbitMQ创建了Docker容器,但无法运行Container,它会自动停止。
Docker文件
FROM centos:centos7
RUN yum -y update
RUN yum -y install wget
RUN wget https://www.rabbitmq.com/releases/erlang/erlang-18.2-1.el6.x86_64.rpm
RUN yum -y install erlang-18.2-1.el6.x86_64.rpm
RUN wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-3.6.9-1.el7.noarch.rpm
RUN yum -y install rabbitmq-server-3.6.9-1.el7.noarch.rpm
EXPOSE 15672
EXPOSE 5672
RUN rabbitmq-plugins enable rabbitmq_management
CMD /usr/sbin/rabbitmq-server -detached
Docker构建命令
docker build -t rabbit .
Docker运行命令
docker run -d -p 15672:15672 rabbit
容器启动但是在第二次
之后退出提前致谢