-
check user and group of host user: https://kb.iu.edu/d/adwf
id -u <username> id -g <username> # (most times both 1000) # show all just used id command id
-
info for setting user in docker compose: https://stackoverflow.com/a/56904335/5628238
-
set id in service of docker-compose.yml
services: php: # this is my service name user: "${UID}:${GID}" # we added this line to get a specific user / group id image: php:7.3-fpm-alpine # this is my image # and so on
-
set id in .env file next to docker-compose.yml
UID=1000 GID=1000
-
Created
April 5, 2022 09:18
-
-
Save suiluj/8a66b909d374d62fb6538eeafa66d994 to your computer and use it in GitHub Desktop.
Bind mount folder in docker compose without having to change folder or file permissions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment