My docker-compose looks like this:
version: \'3.2\'
services:
mq:
hostname: ${HOST_NAME}
ports:
- \"5671:5671\"
- \"5672:5672\"
- \"1
I think you have to set username and password from environmental variable or from specific file use -f
flag with - (dash) as the filename to read the configuration from stdin.which contains username and password.
This seem to be an issue with current rabbitmq
Dockerfile. Particulary sed command seem not work properly on configfile mapped as volume. However as you have control over your rabbitmq.conf
anyway, why not include default user and password to this file
default_user = admin
default_pass = YourStrongPasswort
and remove RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS out of your compose file. This is fastest work-around probably. Just tested, works for me (official rabbitmq:3.7-management).
I recently faced the same issue with rabbitmq:3.7.8-management
image.
I was able to work-around the issue by providing advanced.config
instead of rabbitmq.conf
.
advanced.config
uses a legacy Erlang format, other than that, it worked perfectly for me.
I also provided RABBITMQ_*
environment variables, so it's not an issue.
In my case I was creating a cluster, but I believe the solution is relevant for all use-cases for now until rabbitmq.conf
becomes available.