You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create my own rabbitmq Dockerfile with custom configurations and definitions baked in the container. (COPY'ed directly into /etc/rabbitmq/rabbitmq.config) When I start the container, it gives me this:
/usr/local/bin/docker-entrypoint.sh: line 386: /etc/rabbitmq/rabbitmq.config: Permission denied.
I then tried to add RUN chmod 777 /etc/rabbitmq/rabbitmq.config to my Dockerfile, it did run. However, it simply overwrote my rabbitmq.config with the default one, and non of my settings were properly applied.
Reproduced on 17.06.2-ce and rabbitmq:3.6.11, both on a macOS 10.12 and a Ubuntu 16.04 box. I verified the overwrite by manually attaching bash into the container and cat-ing the config.
Here's my Dockerfile:
FROM rabbitmq:3.6.11
MAINTAINER Project Wyze Team
COPY rabbitmq_message_timestamp.ez /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.11/plugins/
COPY rabbitmq.config /etc/rabbitmq/
COPY definitions.json /etc/rabbitmq/
RUN chmod +r /etc/rabbitmq/rabbitmq.config
RUN rabbitmq-plugins enable --offline rabbitmq_management
RUN rabbitmq-plugins enable --offline rabbitmq_mqtt
RUN rabbitmq-plugins enable --offline rabbitmq_message_timestamp
ENV RABBITMQ_HIPE_COMPILE 1
EXPOSE 15672
EXPOSE 1883
I think this comment is partly applicable. Basically, you should set the hipe_compile option in your config file and remove the ENV, and then the entrypoint script will no longer try to overwrite your config.
@yosifkit Bingo! Thanks man, that's exactly the problem! Actually it would be great if this behavior is properly documented on the docker hub page. I'll try to PR this later.
I'm trying to create my own rabbitmq Dockerfile with custom configurations and definitions baked in the container. (COPY'ed directly into /etc/rabbitmq/rabbitmq.config) When I start the container, it gives me this:
/usr/local/bin/docker-entrypoint.sh: line 386: /etc/rabbitmq/rabbitmq.config: Permission denied
.I then tried to add
RUN chmod 777 /etc/rabbitmq/rabbitmq.config
to my Dockerfile, it did run. However, it simply overwrote myrabbitmq.config
with the default one, and non of my settings were properly applied.Reproduced on
17.06.2-ce
andrabbitmq:3.6.11
, both on amacOS 10.12
and aUbuntu 16.04
box. I verified the overwrite by manually attachingbash
into the container andcat
-ing the config.Here's my Dockerfile:
And here's my section of
docker-compose
:The text was updated successfully, but these errors were encountered: