Open zoobab opened 3 years ago
What OS are you using? Any sudo
ing going on?
It should just work.
Probably worth trying again in a fresh directory and see if that fixes it - shouldn't take too long.
I got the same issue. I think the problem here is that the owner of the build
directory created by the process appears to be root
. (Yes, I am the peter
user.)
drwxrwxr-x 8 peter peter 4096 Oct 11 09:09 .
drwxrwxr-x 12 peter peter 4096 Oct 11 09:05 ..
drwxr-xr-x 2 root root 4096 Oct 11 09:09 build
drwxrwxr-x 2 peter peter 4096 Oct 11 09:05 civicrm
-rw-rw-r-- 1 peter peter 1274 Oct 11 09:05 docker-compose-build.yml
-rw-rw-r-- 1 peter peter 1166 Oct 11 09:05 docker-compose.yml
drwxrwxr-x 2 peter peter 4096 Oct 11 09:05 extra
drwxrwxr-x 8 peter peter 4096 Oct 11 09:05 .git
-rw-rw-r-- 1 peter peter 48 Oct 11 09:05 .gitignore
-rw-rw-r-- 1 peter peter 34523 Oct 11 09:05 LICENSE
drwxrwxr-x 4 peter peter 4096 Oct 11 09:05 publish
-rw-rw-r-- 1 peter peter 9555 Oct 11 09:05 README.md
drwxrwxr-x 2 peter peter 4096 Oct 11 09:05 .vscode
Once I changed the ownership of the build
directory to peter:peter
, the process worked.
Thanks for the extra info @peterkmurphy - your diagnosis and work around sounds right.
Just trying to think about how we can solve this in an elegant way. I was assuming that /buildkit/build on the container was owned by the civicrm user, which would map to user 1000 but I see that it isn't.
Will have a think about how to solve this. In the mean time, that workaround makes sense.
I've just had the same issue and raised it https://lab.3sd.io/tools/civicrm-buildkit-docker/-/issues/65
I think the answer is simply to include the build
directory in the repo. See https://lab.3sd.io/tools/civicrm-buildkit-docker/-/merge_requests/65
I also used the same workaround as @peterkmurphy
Unfortunatley, that won't work @wmortada
We need the build directory to be populated from the container because it is not empty (it has a .amp directory in it). Some alternative approaches:
/buildkit/build/.amp
to somewhere else and configuring .amp to look for it there.buildkit/build
and everything below it to the buildkit user and group when the container is started (easier, and, I think reasonable, though I think it would be good to avoid changing file permissions if we don't need to, and I am not sure if it would solve 100% it would change the ownership on the host). We could do that in docker-civicrm-entrypoint
.unfortunatly, it doesn´t work! I Got this error message: can´t install _my system: Ubuntu 22.04 LTS docker michaelmcandrew/civicrm-buildkit-docker :latest
+++ drush site-install -y --db-url=mysql://dmastercms_imjof:ZSGjTBvrwdBlpwDI@mysql:3306/dmastercms_h32ty --account-name=admin --account-pass=zQ6bT4hn9A37 --account-mail=admin@example.com '--site-name=CiviCRM Sandbox on Drupal' --sites-subdir=default Command site-install needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command. [error] The drush command 'site-install' could not be executed. [error]
The build folder is created on this COPY command. Stack Exchange says that Docker always runs COPY as root, for whatever reason. Fix is:
COPY --chown=buildkit:buildkit apache24-vhost.php /buildkit/build/.amp/apache24-vhost.php
Any objections to that? Seems to work ok.
Wait no, I see I'm at cross purposes. I'll keep poking at it...
Hey @awestuk - was on holiday last week but back this week. Let me know if you want to discuss in more detail. Also, we have moved this repo to here: https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker. Feel free to submit issues there.
Hey,
Juts following the instructions, but the create dmaster fails:
Any idea?