You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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
andGID
) 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. Thedocker-compose
config also supportuser
with similar purpose. You can totally run the docker image ofweb
with the user that actually owns thepublic/*
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 variableUID
andGID
supposedly for that purpose. But the current docker-compose file does not reference them. Thus you'd need to customize yourdocker-compose
file yourself and there is no documentation for that.master
(If you're a user, don't worry about this).The text was updated successfully, but these errors were encountered: