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
Pass --user (`DOCKER_USER`) attribute when creating the container.
This has no effect in production since we are using the same user and
group than the one defined inside the Dockerfile image (docs:docs).
Although, this allow us to avoid permissions conflicts when running
the build with Docker locally (development) since we can pass our
current user.
That way, every file created/modified inside the container will be
done using the current UID and GID defined by the developer.
This can be done as,
local_settings.py
DOCKER_USER = f'{os.geteuid()}:{os.getegid()}'
With this change, there is no need to re-build the Docker image used
in production with our own custom `USER` instruction.
https://docs.docker.com/engine/reference/run/#user
0 commit comments