Skip to content

Allow rabbitmq user to write on /etc/rabbitmq #2919

Description

@PaulContremoulin

Category:

Container images (RabbitMQ)

Type:

  • Bug
  • Feature Request
  • Process

Hi,

I would like to attach a volume on the /etc/rabbitmq path, in the same way as /var/lib/rabbitmq. The goal is to save rabbitmq configs and enabled plugins on the same place.

But, when I attach a volume on the /etc/rabbitmq path, container can't start due to the following error:

touch: cannot touch '/etc/rabbitmq/rabbitmq.conf': Permission denied

It's possible to add a line to the entrypoint.sh to grant right privileges to rabbitmq ? I saw a similar approach for the /var/lib/rabbitmq path in the entreproint.sh file:

f [ "$1" = 'rabbitmq-server' ]; then
	find /var/lib/rabbitmq \! -user rabbitmq -exec chown rabbitmq '{}' +
fi

(source: https://github.com/GoogleCloudPlatform/click-to-deploy/blob/master/docker/rabbitmq/3/debian12/3.13/docker-entrypoint.sh)

Many thanks !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/dockerRelated to the Docker imageneeds-triageThis wasn't investigate by the repo's owners yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions