Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider reading the RABBITMQ_ERLANG_COOKIE also from files. #279

Closed
janpaulus opened this issue Sep 21, 2018 · 5 comments
Closed
Labels
Request Request for image modification or feature

Comments

@janpaulus
Copy link

If we could tell the container something like this “-e ‘RABBITMQ_ERLANG_COOKIE_FILE=/run/secrets/rabbitmq_erlang_cookie’” we could use docker secrets for the erlang cookie.

@tianon
Copy link
Member

tianon commented Sep 21, 2018

Great idea! (#280)

@janpaulus
Copy link
Author

Thanks for the answer.
When I at the erlang cookie like this to my docker stack file:
secrets:
- source: rabbitmq_erlang_cookie
target: /var/lib/rabbitmq/.erlang.cookie
uid: "999"
gid: "999"
mode: 0600

I always get the Error:
chown: changing ownership of '/var/lib/rabbitmq/.erlang.cookie': Read-only file system

In the docker compose doc (https://docs.docker.com/compose/compose-file/#long-syntax-2) I found this sentence: "Secrets cannot be writable because they are mounted in a temporary filesystem, so if you set the writable bit, it is ignored."

@tianon
Copy link
Member

tianon commented Sep 24, 2018

Try also adding user: 999:999 to the service (which will skip the chown).

@yosifkit looks like this is another good candidate for your find ... chown ... one-liner 😅

@janpaulus
Copy link
Author

When I add user: 999:999 it works. Thanks a lot. You can close the ticket if you like.

@yosifkit
Copy link
Member

Once #281 gets in the image, you won't have to use user: 999:999, but it is safe either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

4 participants