================Dockerfile1=================
FROM rabbitmq:3-management
MAINTAINER 123 "qyb1234@everbridge.com"
RUN apt-get update
ENV REFERSHED_AT 2015-07-20
RUN apt-get install -y python
ADD rabbitmqadmin /usr/local/bin/rabbitmqadmin
RUN chmod 755 /usr/local/bin/rabbitmqadmin
RUN service rabbitmq-server start && /usr/local/bin/rabbitmqadmin declare queue name=my-new-queue durable=true && service rabbitmq-server stop
RUN rabbitmq-plugins enable --offline rabbitmq_management
EXPOSE 15672
CMD rabbitmq-server
==============Dockerfile2===================
FROM rabbitmq:3-management
MAINTAINER 123 "qyb1234@gmail.com"
RUN apt-get update
ENV REFERSHED_AT 2015-07-20
RUN apt-get install -y python
ADD rabbitmqadmin /usr/local/bin/rabbitmqadmin
RUN chmod 755 /usr/local/bin/rabbitmqadmin
RUN rabbitmq-plugins enable --offline rabbitmq_management
EXPOSE 15672
CMD service rabbitmq-server start && /usr/local/bin/rabbitmqadmin declare queue name=my-new-queue durable=true && service rabbitmq-server stop && rabbitmq-server
使用 Dockerfile1 时队列没有声明,但是 Dockerfile2 有效。Dockerfile1 和 Dockerfile2 有什么区别?