Skip to content

Commit c766dd4

Browse files
committed
Combine file creation with chown/chmod RUN
1 parent 9f200aa commit c766dd4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5959
# /usr/sbin/rabbitmq-server has some irritating behavior, and only exists to "su - rabbitmq /usr/lib/rabbitmq/bin/rabbitmq-server ..."
6060
ENV PATH /usr/lib/rabbitmq/bin:$PATH
6161

62-
RUN echo '[ { rabbit, [ { loopback_users, [ ] } ] } ].' > /etc/rabbitmq/rabbitmq.config
63-
6462
# set home so that any `--user` knows where to put the erlang cookie
6563
ENV HOME /var/lib/rabbitmq
6664

6765
RUN mkdir -p /var/lib/rabbitmq /etc/rabbitmq \
66+
&& echo '[ { rabbit, [ { loopback_users, [ ] } ] } ].' > /etc/rabbitmq/rabbitmq.config \
6867
&& chown -R rabbitmq:rabbitmq /var/lib/rabbitmq /etc/rabbitmq \
6968
&& chmod -R 777 /var/lib/rabbitmq /etc/rabbitmq
7069
VOLUME /var/lib/rabbitmq

0 commit comments

Comments
 (0)