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

Docker Compose based setup does not support overriding user #7116

Closed
2 tasks done
yookoala opened this issue Apr 12, 2018 · 0 comments
Closed
2 tasks done

Docker Compose based setup does not support overriding user #7116

yookoala opened this issue Apr 12, 2018 · 0 comments

Comments

@yookoala
Copy link
Contributor

The current docker file hard coded to have the running user as mastodon.mastodon (991.991). The only way to override that is to inject build arguments (UID and GID) when you're building the image.

The issue arises after PR #3159, that attempts to fix issue #2680.

This approach is rather non-flexible. You are forced to decide the user id and group id provided by the container. This also make the installation process confusing.

Docker tools actually supports you to inject UID and GID when you run it.

The docker run command support a --user argument that can inject the running uid / gid into the container. The docker-compose config also support user with similar purpose. You can totally run the docker image of web with the user that actually owns the public/* folder. Then uploads would work naturally.

The beauty of this approach is you don't have to deal with the arbitrary 991 ownership at all.

The current .env.production.sample already has variable UID and GID supposedly for that purpose. But the current docker-compose file does not reference them. Thus you'd need to customize your docker-compose file yourself and there is no documentation for that.


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants