Skip to content

schmidigital/permission-fix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is the purpose of this permission fix? See this issue: moby/moby#22258 (comment)

What is this solution doing? It's a simple mapping from your user/group to a user/group inside the docker.

How to use this?

  1. Clone the Repo

  2. Go inside your repo folder and set the permissions

chmod +x tools/entrypoint tools/permission_fix
  1. Fit the docker-compose.yml to your settings
VOLUME: '/www' (The Volume you want to chown after setting the permission fix)
DOCKER_USER: 'www-data' (The User inside the docker)
DOCKER_GROUP: 'www-data' (The group inside the docker)
HOST_USER_ID: 1002 (Your User ID, by default in the docker it's 0 for the root user)
HOST_GROUP_ID: 999 (Your Group ID, by default in the docker it's 0 for the root user)
  1. Let's go
docker-compose up -d
  1. Need proof? OK!
docker-compose exec nginx bash
  1. Inside the Docker...
ls -la /www

Now we mapped this: User: Host 1002 <-> Docker www-data Host 999 <-> Docker www-data

If you have any questions, feel free to ask! I just want everybody to understand :-)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages