Providing rabbitmq.conf in a docker-compose file gives “sed: cannot rename /etc/rabbitmq/sedMaHqMa: Device or resource busy”

前端 未结 3 737
猫巷女王i
猫巷女王i 2021-02-07 07:51

My docker-compose looks like this:

version: \'3.2\'
services:
  mq:
    hostname: ${HOST_NAME}
    ports:
      - \"5671:5671\"
      - \"5672:5672\"
      - \"1         


        
相关标签:
3条回答
  • 2021-02-07 08:35

    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.

    0 讨论(0)
  • 2021-02-07 08:38

    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).

    0 讨论(0)
  • 2021-02-07 08:47

    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.

    0 讨论(0)
提交回复
热议问题