Giter Club home page Giter Club logo

civicrm-buildkit-docker's People

Contributors

amorphous avatar ginkgomzd avatar jaapjansma avatar jasonhildebrand avatar johannawallther avatar kurund avatar michaelmcandrew avatar wmortada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

civicrm-buildkit-docker's Issues

xdebug is loaded twice

When I run a command such as bkc civibuild create I get multiple warning messages saying:

Cannot load Xdebug - it was already loaded

I think this is because Xdebug is getting loaded twice. Once by buildkit.ini and once by debug.ini.

Removing the following line from buildkit.ini seems to fix this issue:

zend_extension=xdebug.so

Fails to build due to changes in buildkit

While trying to fix #56 I came across another error:

rmdir: failed to remove 'buildkit-tmp': Directory not empty

It looks like buildkit has a new folder called .loco and the code isn't moving this folder. Hence the error.

Again, should be pretty straightforward to fix. Just need to copy everything in that folder. I'll submit a PR.

Localhost network issue, or just too resource intensive for this hardware?

Hey there @michaelmcandrew,

First, thank you for your work on this. It appears to make it blissfully simple to get Drupal + CiviCRM set up on my laptop for local development.

I'm wondering, however, if I'm encountering a networking issue or if my laptop is just under powered for the job of running this Docker stack?

What I'm experiencing is that initial network request to the running application on http://drupal8-clean.localhost:7979 will take anywhere from 30 seconds to a minute before a response is sent. Once the response starts coming, it comes quickly.

That leads me to believe it's a networking issue, but I'm not sure where to start my efforts at investigation given my limited experience with Docker containers.

My laptop specs are as follows:
3.1 GHz Intel Core i7
16 GB 1867 MHz DDR3
1TB SSD
OSX 10.13.6

Though it's not the newest machine, it's been sufficiently responsive when running Docker applications in the past.

Any pointers on where to start poking around to get this development environment a bit more snappy would be greatly appreciated. πŸ™

Many thanks in advance,
Phillip.

Does not build with jessie image

No longer builds from Jessie image as jessie-updates repo does not seem to be available anymore. Replacing with
FROM php:7.1-apache-stretch seems to work fine in the dockerfile

User / Pass

I can see it creates a user admin - but what is the password?

Make a call on nginx vs apache

The point is to establish some best practice and reduce variables so giving an option for hosting seems a bit wrong. We should decide on one or the other.

Fails to build because api4 now in core

A fresh clone of this repo, following install instructions dies on the dmaster build with this error:

cv en --ignore-missing api4
Cannot install incompatible extension: org.civicrm.api4

I think this means its buildkit is not up to date (since api4 moved from being an extension to in core)

Permission error if UID is not 1000

The buildkit user has UID = 1000 and GID = 1000. This is fine if the human user has the same UID and GID (which is often the case). However, if the human user has a different UID and GID then you get a permissions error when trying to run e.g. docker-compose exec -u buildkit civicrm civibuild create dmaster --url http://localhost:8080.

The error is:

Directory /buildkit/build exists, but is not writable.

I'm not sure what the best approach for this is. Change the buildkit UID to match the user? Change the permissions on the build folder to allow buildkit to write?

CiviBuild with older versions of CiviCRM fails

When running a command like civibuild create civi537 --type drupal-demo --civi-ver 5.37.2 fails with

Compiling additional files (For full details, use verbose "-v" mode.)
Compile: Generate CCL wrapper functions

In Event.php line 49:
                                                                                                                                                                                                                                           
  [TypeError]                                                                                                                                                                                                                              
  Argument 1 passed to Composer\EventDispatcher\Event::__construct() must be of the type string, null given, called in /buildkit/build/aivl/web/sites/all/modules/civicrm/vendor/civicrm/composer-compile-plugin/src/Event/CompileTaskEve  
  nt.php on line 55                                                                                                                                                                                                                        
                                                                                                                                                                                                                                           

Exception trace:
  at phar:///buildkit/bin/composer/src/Composer/EventDispatcher/Event.php:49
 Composer\EventDispatcher\Event->__construct() at /buildkit/build/aivl/web/sites/all/modules/civicrm/vendor/civicrm/composer-compile-plugin/src/Event/CompileTaskEvent.php:55
 Civi\CompilePlugin\Event\CompileTaskEvent->__construct() at /buildkit/build/aivl/web/sites/all/modules/civicrm/vendor/civicrm/composer-compile-plugin/src/TaskRunner.php:205
 Civi\CompilePlugin\TaskRunner->runTask() at /buildkit/build/aivl/web/sites/all/modules/civicrm/vendor/civicrm/composer-compile-plugin/src/TaskRunner.php:169
 Civi\CompilePlugin\TaskRunner->run() at /buildkit/build/aivl/web/sites/all/modules/civicrm/vendor/civicrm/composer-compile-plugin/src/TaskRunner.php:74
 Civi\CompilePlugin\TaskRunner->runDefault() at /buildkit/build/aivl/web/sites/all/modules/civicrm/vendor/civicrm/composer-compile-plugin/src/Command/CompileCommand.php:75
 Civi\CompilePlugin\Command\CompileCommand->execute() at phar:///buildkit/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///buildkit/bin/composer/vendor/symfony/console/Application.php:1015
 Symfony\Component\Console\Application->doRunCommand() at phar:///buildkit/bin/composer/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///buildkit/bin/composer/src/Composer/Console/Application.php:334
 Composer\Console\Application->doRun() at phar:///buildkit/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///buildkit/bin/composer/src/Composer/Console/Application.php:130
 Composer\Console\Application->run() at phar:///buildkit/bin/composer/bin/composer:88
 require() at /buildkit/bin/composer:29

compile [--all] [-N|--dry-run] [--soft-options [SOFT-OPTIONS]] [--] [<filterExpr>...]

Subcommand @composer compile  returned with error code 1

In ComposerPassthru.php line 72:
                                                            
  Subcommand @composer compile  returned with error code 1  

drupal-clean type not working?

The below command is giving me a populated DB rather than an empty one:
docker-compose exec -u buildkit civicrm civibuild create drupal_clean --type drupal-clean --url http://localhost:8080 --civi-ver 5.3

It's been a while since I used civibuild so I may be missing something.

HTTP error 403 at http://localhost:8080 after startup

Hey - I wonder if this is related to #17 ?

~/D/civicrm-buildkit-docker (master|βœ”) $ docker-compose up -d
Creating network "civicrmbuildkitdocker_default" with the default driver
Creating civicrmbuildkitdocker_mysql_1   ... done
Creating civicrmbuildkitdocker_maildev_1 ... done
Creating civicrmbuildkitdocker_civicrm_1    ... done
Creating civicrmbuildkitdocker_phpmyadmin_1 ... done

~/D/civicrm-buildkit-docker (master|βœ”) $ curl --head http://localhost:8080
HTTP/1.1 403 Forbidden
Date: Fri, 27 Apr 2018 10:41:45 GMT
Server: Apache/2.4.10 (Debian)
Content-Type: text/html; charset=iso-8859-1

Same result by browser - I'm confident this is the docker/civi combo I'm being rejected by (ie not another docker or local server).

uid=501, OSX

error while building a new site

+++ amp create -f --root=/buildkit/build/dmaster --name=cms --prefix=CMS_ --url=http://localhost:8080 --output-file=/tmp/ampvarfMwTP0 --perm=admin
PHP Error: Call to a member function getDriver() on null in phar:///buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58
PHP Stack trace:
PHP 1. {main}() /buildkit/bin/amp:0
PHP 2. require() /buildkit/bin/amp:10
PHP 3. Amp\Application::main() phar:///buildkit/bin/amp/bin/amp:18
PHP 4. Amp\Application->run() phar:///buildkit/bin/amp/src/Amp/Application.php:59
PHP 5. Amp\Application->doRun() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:124
PHP 6. Amp\Application->doRunCommand() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:193
PHP 7. Amp\Command\CreateCommand->run() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:889
PHP 8. Amp\Command\CreateCommand->execute() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
PHP 9. Amp\InstanceRepository->create() phar:///buildkit/bin/amp/src/Amp/Command/CreateCommand.php:107
PHP 10. Amp\Database\MySQL->createDatasource() phar:///buildkit/bin/amp/src/Amp/InstanceRepository.php:48

Error: Call to a member function getDriver() on null in phar:///buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

Call Stack:
0.0010 354008 1. {main}() /buildkit/bin/amp:0
0.0129 543656 2. require('phar:///buildkit/bin/amp/bin/amp') /buildkit/bin/amp:10
0.0148 847880 3. Amp\Application::main() phar:///buildkit/bin/amp/bin/amp:18
0.0419 3153608 4. Amp\Application->run() phar:///buildkit/bin/amp/src/Amp/Application.php:59
0.0421 3157064 5. Amp\Application->doRun() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:124
0.0422 3157064 6. Amp\Application->doRunCommand() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:193
0.0422 3155696 7. Amp\Command\CreateCommand->run() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:889
0.0424 3159000 8. Amp\Command\CreateCommand->execute() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
0.0443 3370736 9. Amp\InstanceRepository->create() phar:///buildkit/bin/amp/src/Amp/Command/CreateCommand.php:107
0.0443 3370776 10. Amp\Database\MySQL->createDatasource() phar:///buildkit/bin/amp/src/Amp/InstanceRepository.php:48

PHP Fatal error: Uncaught Error: Call to a member function getDriver() on null in phar:///buildkit/bin/amp/src/Amp/Database/MySQL.php:58
Stack trace:
#0 phar:///buildkit/bin/amp/src/Amp/InstanceRepository.php(48): Amp\Database\MySQL->createDatasource('dmastercms')
#1 phar:///buildkit/bin/amp/src/Amp/Command/CreateCommand.php(107): Amp\InstanceRepository->create(Object(Amp\Instance), true, true, 'admin')
#2 phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Amp\Command\CreateCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php(889): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Symfony\Component\Console\Application in phar:///buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

Fatal error: Uncaught Error: Call to a member function getDriver() on null in phar:///buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

Error: Call to a member function getDriver() on null in phar:///buildkit/bin/amp/src/Amp/Database/MySQL.php on line 58

Call Stack:
0.0010 354008 1. {main}() /buildkit/bin/amp:0
0.0129 543656 2. require('phar:///buildkit/bin/amp/bin/amp') /buildkit/bin/amp:10
0.0148 847880 3. Amp\Application::main() phar:///buildkit/bin/amp/bin/amp:18
0.0419 3153608 4. Amp\Application->run() phar:///buildkit/bin/amp/src/Amp/Application.php:59
0.0421 3157064 5. Amp\Application->doRun() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:124
0.0422 3157064 6. Amp\Application->doRunCommand() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:193
0.0422 3155696 7. Amp\Command\CreateCommand->run() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php:889
0.0424 3159000 8. Amp\Command\CreateCommand->execute() phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
0.0443 3370736 9. Amp\InstanceRepository->create() phar:///buildkit/bin/amp/src/Amp/Command/CreateCommand.php:107
0.0443 3370776 10. Amp\Database\MySQL->createDatasource() phar:///buildkit/bin/amp/src/Amp/InstanceRepository.php:48

Apache configuration error

Forbidden
You don't have permission to access / on this server.
Apache/2.4.10 (Debian) Server at localhost Port 8080

Getting this error when lcoalhost:8080 is accessed, however,phpmyadmin is working fine on 8081 and development email at 8082

Error when creating dmaster demo site

When I pull a fresh copy of this repository and execute docker-compose exec -u buildkit civicrm civibuild create dmaster the building process fails with the following error messages. The containers are all running.

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]

I tested it on two different Ubuntu machines with the same result.

Fails to build on PHP 7.4

If you try to build the image with PHP 7.4 it will fail to build with the following error:

configure: error: unrecognized options: --with-jpeg-dir, --with-png-dir

The options for this command have changed as per these upgrade notes.

Should be pretty simple to fix. I'll write a PR.

Updates for XDebug 3

It seems the images (from master) now contain XDebug 3, which has a few significant breaking configuration changes from version 2: https://xdebug.org/docs/upgrade_guide

At first glance it seems changes are only needed in the entrypoint where it writes the XDebug config (and the VSCode launch.json for the new client port).

I'm currently updating my own copy of this to support it. I'll see if I can do up a pull request with the changes sometime this week.

exec: "docker-civicrm-entrypoint": executable file not found in $PATH during docker-compose up

I'm running into an issue with the Docker Hub published michaelmcandrew/civicrm-buildkit image. I believe it's the latest published image from 2 hours ago since I ran docker-compose pull quite recently.

Creating network "crm_default" with the default driver
Creating crm_mysql_1 ...
Creating crm_mysql_1 ... done                                                                                           Creating crm_civicrm_1 ...
Creating crm_civicrm_1 ... error                                                                                        
ERROR: for crm_civicrm_1  Cannot start service civicrm: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"docker-civicrm-entrypoint\": executable file not found in $PATH": unknown

ERROR: for civicrm  Cannot start service civicrm: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"docker-civicrm-entrypoint\": executable file not found in $PATH": unknown
ERROR: Encountered errors while bringing up the project.

Is the entrypoint file chmod +x'd? I didn't notice a line to do that in the Dockerfile.

Node.js is outdated

When building the image, I get the following notice:

================================================================================
================================================================================

                              DEPRECATION WARNING                            

  Node.js 10.x is no longer actively supported!

  You will not receive security or critical stability updates for this version.

  You should migrate to a supported version of Node.js as soon as possible.
  Use the installation script that corresponds to the version of Node.js you
  wish to install. e.g.

   * https://deb.nodesource.com/setup_12.x β€” Node.js 12 LTS "Erbium"
   * https://deb.nodesource.com/setup_14.x β€” Node.js 14 LTS "Fermium" (recommended)
   * https://deb.nodesource.com/setup_16.x β€” Node.js 16 "Gallium"

  Please see https://github.com/nodejs/Release for details about which
  version may be appropriate for you.

  The NodeSource Node.js distributions repository contains
  information both about supported versions of Node.js and supported Linux
  distributions. To learn more about usage, see the repository:
    https://github.com/nodesource/distributions

================================================================================
================================================================================

I've tracked it down to this line:

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - 

Presumably upgrading the version to 14 will fix this? I'll give it a go.

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

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.

Apache logs from the civicrm container do not propogate to the host

amp defines a custom log file for apache that prevents Docker from handling the logs. See amp-cli/amp#52 for more details.

As soon as civicrm/civicrm-buildkit#396 is merged, we can create a new Docker image based on a newer version of buildkit that uses the custom vhost and config added in this commit: 65a0971.

Until then, a workaround is to manually edit the vhost files in /buildkit/.amp/apache.d and remove the lines that define the custom logs.

docker-compose exec -u buildkit civicrm civibuild create dmaster fails

Hey,

Juts following the instructions, but the create dmaster fails:

$ docker-compose exec -u buildkit civicrm civibuild create dmaster
[[Download dmaster (type 'drupal-demo' in '/buildkit/build/dmaster')]]
[[Update caches]]
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 17 (delta 10), reused 12 (delta 10), pack-reused 1
Unpacking objects: 100% (17/17), done.
From https://github.com/civicrm/civicrm-core
   df8b072401..83a10ad53e  5.35       -> 5.35
   10efdb7609..06e3452557  master     -> master
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 15 (delta 0), reused 15 (delta 0), pack-reused 0
Unpacking objects: 100% (15/15), done.
From https://github.com/civicrm/civivolunteer
 * [new tag]         v1.3.3     -> v1.3.3
 * [new tag]         v1.4.0     -> v1.4.0
 * [new tag]         v1.4.1     -> v1.4.1
 * [new tag]         v2.0.0     -> v2.0.0
 * [new tag]         v2.0.1     -> v2.0.1
 * [new tag]         v2.0.2     -> v2.0.2
 * [new tag]         v2.1.0     -> v2.1.0
 * [new tag]         v2.1.1     -> v2.1.1
 * [new tag]         v2.1.2     -> v2.1.2
 * [new tag]         v2.2.0     -> v2.2.0
 * [new tag]         v2.2.1     -> v2.2.1
 * [new tag]         v2.2.2     -> v2.2.2
 * [new tag]         v2.2.3     -> v2.2.3
 * [new tag]         v2.3.0     -> v2.3.0
 * [new tag]         v2.3.1     -> v2.3.1
[[Execute /buildkit/app/config/drupal-demo/download.sh]]
++ source /buildkit/app/config/drupal-demo/download.sh
+++ '[' -z '' ']'
+++ CMS_VERSION=7.x
+++ '[' -z master ']'
+++ '[' -z '' ']'
+++ NG_PRFL_VERSION=master
+++ '[' -z '' ']'
+++ RULES_VERSION=master
+++ '[' -z master ']'
+++ drupal_download
+++ cvutil_assertvars drupal_download WEB_ROOT CMS_VERSION PRJDIR
+++ _cvutil_assertvars_back=ehxB
+++ set +x
+++ mkdir /buildkit/build/dmaster
mkdir: cannot create directory '/buildkit/build/dmaster': Permission denied

Any idea?

Failed to locate valid civi root

I have followed the instructions to set-up dmaster, but the installation fails.

+++ '[' '!' -d /buildkit/build/dmaster/web/sites/all/modules/civicrm/bin -o '!' -d /buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM ']'
+++ cvutil_fatal 'Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm'
+++ echo 'Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm'
Failed to locate valid civi root: /buildkit/build/dmaster/web/sites/all/modules/civicrm
+++ exit 90

Any idea? Thanks in advance.

Tests running slow

@totten - I am opening up this issue to discuss slow running tests on buildkit (see #15 (comment) for the origin)

time env CIVICRM_UF=UnitTests phpunit4 tests/phpunit/CRM/Core/AllTests.php on my machine (Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz dual core with 8GB ram) is 14m4.434s based on a sample size of one.

I do not recall getting it much below this even with bare metal on this machine. Not sure what that means but regardless, it would be great to speed things up.

Tag of docker image, "new" not exist

I'm getting a error with docker-compose up -d the docker

Creating network "civicrm-buildkit-docker_default" with the default driver
Pulling civicrm (michaelmcandrew/civicrm-buildkit:new)...
ERROR: manifest for michaelmcandrew/civicrm-buildkit:new not found: manifest unknown: manifest unknown

Line with the image
https://github.com/michaelmcandrew/civicrm-buildkit-docker/blob/master/docker-compose.yml#L4

In the tags available not appear the tag new
https://hub.docker.com/r/michaelmcandrew/civicrm-buildkit/tags?page=1&ordering=last_updated

Question about docker-compose command line not working

Hello Mr. McAndrew -

Thank you for all your work on building this docker image.

I am attempting to bring up the docker image for CiviCRM on my Windows machine using your instructions from https://github.com/michaelmcandrew/civicrm-buildkit-docker

I installed docker and upgraded to the latest version:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker --version
Docker version 17.03.1-ce-rc1, build 3476dbf

My first attempt to use the code in your repository produced this error:

ERROR: Version in ".\docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version ("2.0", "2.1", "3.0") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.

I then edited .\docker-compose by changing the version to 3.0:

version: "3.0"

I then checked out your stable version:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> git checkout 8b5d6c7

I then shared my drive as described here:

https://forums.docker.com/t/cannot-share-drive-in-windows-10/28798

I then tried to run β€˜docker-compose exec’:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker-compose exec -u buildkit civicrm civibuild create dmaster
Execute a command in a running container

Usage: exec [options] SERVICE COMMAND [ARGS...]

Options:
-d Detached mode: Run command in the background.
--privileged Give extended privileges to the process.
--user USER Run the command as this user.
-T Disable pseudo-tty allocation. By default docker-compose exec
allocates a TTY.
--index=index index of the container if there are multiple
instances of a service [default: 1]

Can you give me some clue as to how to get around this?

Best regards, and many thanks,
Christopher β€˜CK’ Keith

How can we help people who want to use this project with PHP 5.6?

I came to this project because my local machine has PHP 7.1 and I had a need to run a client site within PHP 5.6 for troubleshooting and development. I made these changes to the code here and was able to build a CiviCRM site within a container running PHP 5.6. Yay!

Now I'm wondering what the best way would be to help other people who might be in this same situation.

Ideas:

  • Maintain a separate branch in this repo
  • Add some documentation which tells people how to manually make the changes I made

Curious what other ideas people have. It didn't take me too long to figure out how to make these changes, but it did require some basic understanding of Docker. And I really like the idea of other people being able to use this project without having too much understanding of Docker.

Empty continuation line

Docker is showing a warning about the empty continuation line in the Dockerfile:

[WARNING]: Empty continuation line found in:
    RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -   && apt-get update   && apt-get install -y --no-install-recommends   bash-completion   default-mysql-client   git   iproute2   less   libc-client-dev   libicu-dev   libjpeg62-turbo-dev   libkrb5-dev   libmagickwand-dev   libpng-dev   libxml2-dev   libzip-dev   msmtp-mta   nano   nodejs   rsync   sudo   unzip   vim   zip   && rm -r /var/lib/apt/lists/*
[WARNING]: Empty continuation lines will become errors in a future release.

I think we just need to remove the blank line.

  zip \

  && rm -r /var/lib/apt/lists/*

Better handle civibuild create on the host machine

We currently need to create vhosts manually on the host machine. It would be good to eliminate that step.

Could create a wrapper around civibuild create to create the hosts on a local machine.

Alternative approach would be to make buildkit and amp Docker friendly / cloud native.

NodeJS error when creating dmaster

Hi,
I get the following warnings when I create a new dmaster build:

WARNING: Failed to locate command "node". NodeJS (http://nodejs.org/) is required for development of CiviCRM v4.6+.
WARNING: Failed to locate command "npm". NodeJS (http://nodejs.org/) is required for development of CiviCRM v4.6+.

Later the building process fails at this point:

./bin/setup.sh: line 153: npm: command not found

-> full log

Could this be related to issue #68 or PR #69?

Unable to start image on buster

Following on from #56, I've had another issue trying to get buildkit running PHP 7.4. When I bring up the image I get the following error:

civicrm_1     | AH00526: Syntax error on line 2 of /buildkit/.amp/apache.d/localhost_7979.conf:
civicrm_1     | Cannot define multiple Listeners on the same IP:port

This seems to be an issue with a port conflict. I've tried running PHP 7.3 on buster and this also fails in the same way so I don't think it is anything to do with the PHP version. I wonder if this might be something to do with how apache works on buster?

Any ideas?

Unable to build dmaster on Windows

It looks like civicrm-buildkit-docker doesn't work on Windows machines due to file permission issues.

I'm raising this ticket following a discussion in mattermost to alert others that may attempt to use Docker on Windows.

The main issue

I've got the container up and running but buildkit create dmaster fails on a drush command. It gets most of the way through the installation. The files are there, the database is created. I can even see the drupal install screen in the browser but the installation doesn't complete.

The drupal installation fails at this step: drush vset --yes file_private_path /buildkit/app/private/dmaster/default

With the following error:

Command variable-set needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.

The drush command 'vset file_private_path /buildkit/app/private/dmaster/default' could not be executed.

If I log in to the docker container the /buildkit/build directory and contents are owned by root not buildkit which seems odd. On my linux machine that directory and contents are owned by buildkit which makes me think there is something wrong with permissions.

That folder is a filesystem mount from Windows. This means that it isn't possible to change the permissions e.g. with sudo chown -R buildkit:buildkit /buildkit/build. This doesn't work because Windows is controlling the filesystem permissions.

This appears to be a limitation of Docker Desktop on Windows so I don't know if it is possible to fix this here. It may just be a question of letting people know that it doesn't work on Windows.

Thanks to @MikeyMJCO for helping to confirm this issue

Another issue

I've also found that the site is accessible at http://localhost:7979 rather than http://dmaster.localhost:7979 so something isn't working with the network.

buildkit create wpmaster completes installation but I'm unable to view the site at http://wpmaster.localhost:7979 or http://localhost:7979. I just get an 'unable to connect' to server message.

Environment

Windows 10
Docker Desktop for Windows v 19.03.1

Build fails on OSX

I'm using a late 2009 Mac, so am forced to use the boot2docker setup. Everything else is up to date (OS, docker-machine, docker).

Running docker-machine up works, things are built.
docker-compose exec -u buildkit civicrm civibuild create dmaster --url http://localhost:8080

This seems to run fine, but then hits an error with the Drupal install.

There are issues with Mac/Docker/Drupal with file/folder permissions. One way others have solved this is to allow for the primary user to have the default macOS user permission. The user would need 501:20 uid/gid.

Do you have any suggestions on how we might apply those permissions to user buildkit?

Here is the log info:

+++ chmod u-w sites/default/settings.php
+++ amp datadir sites/default/files /buildkit/app/private/dmaster/default
Update data directory: sites/default/files
PHP Fatal error:  Uncaught RuntimeException: setfacl: sites/default/files: Operation not supported
 in phar:///buildkit/bin/amp/src/Amp/Permission/External.php:43
Stack trace:
#0 phar:///buildkit/bin/amp/src/Amp/Command/DatadirCommand.php(40): Amp\Permission\External->applyDirPermission('write', 'sites/default/f...')
#1 phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Amp\Command\DatadirCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php(889): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///buildkit/bin/amp/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Amp\Command\DatadirCommand), Object(Symfony\Component\Console\Inpu in phar:///buildkit/bin/amp/src/Amp/Permission/External.php on line 43

Fatal error: Uncaught RuntimeException: setfacl: sites/default/files: Operation not supported
 in phar:///buildkit/bin/amp/src/Amp/Permission/External.php on line 43

RuntimeException: setfacl: sites/default/files: Operation not supported
 in phar:///buildkit/bin/amp/src/Amp/Permission/External.php on line 43

Call Stack:
    0.0007     353672   1. {main}() /buildkit/bin/amp:0
    0.0094     543320   2. require('phar:///buildkit/bin/amp/bin/amp') /buildkit/bin/amp:10
    0.0154     844208   3. Amp\Application::main() phar:///buildkit/bin/amp/bin/amp:18
    0.0821    3100448   4. Amp\Application->run() phar:///buildkit/bin/amp/src/Amp/Application.php:59

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.