michaelmcandrew / civicrm-buildkit-docker

This is a read only copy. Please make PRs here: https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
GNU Affero General Public License v3.0
40 stars 31 forks source link

Directory /buildkit/build exists, but is not writable. Please check directory permissions. #25

Closed thiagobit closed 5 years ago

thiagobit commented 6 years ago

Hello!

I did a fresh installation and, following the steps in Getting started section, I have problems when running docker-compose exec -u buildkit civicrm civibuild create dmaster --url http://localhost:8080

I got this permission error: Directory /buildkit/build exists, but is not writable. Please check directory permissions.

After login in the container, I saw that /buildkit/build directory was owned by 1001:1001: civicrm-buildkit-docker_container

To overcome this I needed to run sudo chown buildkit:buildkit /buildkit/build and now it's ok.

Just to get you guys aware of this.

michaelmcandrew commented 6 years ago

Hi there,

Thanks for the report. I'm guessing the user on your host machine has UID and GID of 1001.

If so, then you might run into permissions issues when editing files on your local machine with the solution you outlined.

Did you see https://github.com/michaelmcandrew/civicrm-buildkit-docker#custom-builds and https://github.com/michaelmcandrew/civicrm-buildkit-docker#uid-and-gid-conflicts.

Hopefully that helps - let me know how you get on.

michaelmcandrew commented 5 years ago

Just to clarify, a better solution in this case is to build a new docker image where the UID and GID of buildkit matches the UID and GID of your local user.

You can do this by following instructions here:https://github.com/michaelmcandrew/civicrm-buildkit-docker#custom-builds