Giter Club home page Giter Club logo

Comments (8)

michaelmcandrew avatar michaelmcandrew commented on June 29, 2024

What OS are you using? Any sudoing 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.

from civicrm-buildkit-docker.

peterkmurphy avatar peterkmurphy commented on June 29, 2024

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.

from civicrm-buildkit-docker.

michaelmcandrew avatar michaelmcandrew commented on June 29, 2024

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.

from civicrm-buildkit-docker.

wmortada avatar wmortada commented on June 29, 2024

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

from civicrm-buildkit-docker.

michaelmcandrew avatar michaelmcandrew commented on June 29, 2024

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:

  • reengineer buildkit so that the build directory is empty (upstream issue). This probably just means moving whatever is in /buildkit/build/.amp to somewhere else and configuring .amp to look for it there.
  • ensure that we set the ownership of 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.

from civicrm-buildkit-docker.

hyperion14 avatar hyperion14 commented on June 29, 2024

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=[email protected] '--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]

from civicrm-buildkit-docker.

awestuk avatar awestuk commented on June 29, 2024

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...

from civicrm-buildkit-docker.

michaelmcandrew avatar michaelmcandrew commented on June 29, 2024

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.

from civicrm-buildkit-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.