================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 の違いは何ですか?