BALAJI V:
Hi Guys,
I am trying to build the image but i am getting the below error
Removing intermediate container c94fe7da1634
—> 47a0ed5be548
Step 8/9 : RUN chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
—> Running in 0ae51b755020
chown: cannot access ‘/var/lib/rabbitmq/.erlang.cookie’: No such file or directory
The command ‘/bin/sh -c chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie’ returned a non-zero code: 1
Can anyone help here?
Thanks in Advance
BALAJI V:
This is my Dockerfile
FROM rabbitmq:3.11.15-management
EXPOSE 15672
EXPOSE 5672
USER rabbitmq
ADD config/ /etc/rabbitmq/
RUN cd /var/lib/rabbitmq && echo “test” > /var/lib/rabbitmq/.erlang.cookie
RUN ls -l /var/lib/rabbitmq/
RUN chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
RUN chmod -R 600 /var/lib/rabbitmq/
Al West:
works for me if I remove the ADD part and remove -R from your commands (you don’t need the recursive option).
Al West:
Helps if you put the full output though - there is probably an error before the cookie creation.