Code Monkey home page Code Monkey logo

docker-drupal's Issues

Build Image Fails

When i try to fork and build the image i am getting an error that it's returning a non-zero code. Any ideas?

Your requirements could not be resolved to an installable set of packages.
The command '/bin/sh -c curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer && COMPOSER_HOME=/opt/composer composer --quiet global require drush/drush:dev-master && ln -s /opt/composer/vendor/drush/drush/drush /bin/drush' returned a non-zero code: 2

run composer after cloning a drupal 8 repo

Hi there and thanks for this cool work.

I'm trying to get my code from my github repo. there i don't place vendor files, but when running a container like this i get an error saying i have no vendor/autoload.php

So, do i need to run composer install after cloning?

Thanks.

Where is located the external mysql config ?

Hi Boran, i'm trying to use your docker-drupal and i would like to know how drupal finds the exeternal mysql config passed by env with docker ?

I mean, as far as i know we need to update settings.php and set the database values on the drupal project we're working on.

docker run -td -p 8004:80 --name bc -e "DRUPAL_VERSION=drupal-8" -e "DRUPAL_ADMIN_PW=foo" -e "DRUPAL_SITE_NAME=My Super site" -e "MYSQL_HOST=10.1.1.1" -e "MYSQL_DATABASE=drupal_site1" -e "MYSQL_USER=drupal_site1" -e "MYSQL_PASSWORD=pass4drupal_site1" -v /opt/foo:/var/www/html boran/drupal

How does it work with docker ? Which moment the value is set, how those variables are set on the settings.php ?

Thanks!

Drupal does not install - incorrect drush bootstrap level

After the a vanilla installation using:
docker run -td -p 8003:80 -e "DRUPAL_ADMIN_PW=foo" -e "DRUPAL_SITE_NAME=My Super site" --name drupal8003 boran/drupal

The site comes up nicely (on my mac at: http://192.168.59.103:8003) but starts an installation process.

Closer inspection shows:
bash-3.2$ docker logs -f drupal8003
140905 02:45:21 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
140905 02:45:21 mysqld_safe Logging to '/var/log/mysql/error.log'.
140905 02:45:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysql root and drupal password, see /mysql-root-pw.txt /drupal-db-pw.txt
Enabling module rewrite.
Enabling module vhost_alias.
Enabling module headers.
To activate the new configuration, you need to run:
service apache2 restart
Installing Drupal with profile site-name=My Super site
Command site-install needs a higher bootstrap level to run - you will[error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'site-install' could not be executed. [error]
A Drupal installation directory could not be found [error]
Drupal add second user
Command user-create needs a higher bootstrap level to run - you will [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'user-create' could not be executed. [error]
A Drupal installation directory could not be found [error]
Command user-add-role needs a higher bootstrap level to run - you [error]
will need to invoke drush from a more functional Drupal environment
to run this command.
The drush command 'user-add-role administrator' could not be [error]
executed.
A Drupal installation directory could not be found [error]
140905 02:45:27 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Drupal site installed
2014-09-05 02:45:28,684 CRIT Supervisor running as root (no user in config file)
2014-09-05 02:45:28,693 INFO RPC interface 'supervisor' initialized
2014-09-05 02:45:28,693 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-09-05 02:45:28,694 INFO supervisord started with pid 428
2014-09-05 02:45:29,700 INFO spawned: 'httpd' with pid 431
2014-09-05 02:45:29,703 INFO spawned: 'memcached' with pid 432
2014-09-05 02:45:29,704 INFO spawned: 'mysqld' with pid 433
2014-09-05 02:45:30,911 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-09-05 02:45:30,911 INFO success: memcached entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-09-05 02:45:30,912 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Using FROM boran/drupal in Dockerfile, subsequent RUN drush en -y [module] gets pm-enable needs higher bootstrap level error

I've been using your image to try to show an integration between angular and drupal.

It works well if I just start the image and then drush en -y ngapp, but when I try to use a Dockerfile that does the same thing, it fails with

Sending build context to Docker daemon 2.048 kB
Step 0 : FROM boran/drupal
 ---> cfd7bc61f89c
Step 1 : RUN drush en -y ngapp
 ---> Running in c1ece4f85de6
Command pm-enable needs a higher bootstrap level to run - you will   [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'en ngapp' could not be executed.                  [error]
The command '/bin/sh -c drush en -y ngapp' returned a non-zero code: 1
BAM-034083-JB:drupal brereton$ Command pm-enable needs a higher bootstrap level to run - you will   [error]
/

Some more issues while building.

Hello again, here's my issue now.
Cloned your repo, entered in the cloned folder and tried

 docker build -t boran-docker-drupal .

Two things here.
Drush can't be installed. it looks dev-master has some unmet dependencies. here's the output

Removing intermediate container 4856a4a0fb30
Step 6 : RUN curl -sS https://getcomposer.org/installer | php &&     mv composer.phar /usr/local/bin/composer &&     COMPOSER_HOME=/opt/composer composer --quiet global require drush/drush:dev-master &&     ln -s /opt/composer/vendor/drush/drush/drush /bin/drush
 ---> Running in 552868417dfb
All settings correct for using Composer
Downloading 1.1.1...

Composer successfully installed to: //composer.phar
Use it: php composer.phar
Your requirements could not be resolved to an installable set of packages.
The command '/bin/sh -c curl -sS https://getcomposer.org/installer | php &&     mv composer.phar /usr/local/bin/composer &&     COMPOSER_HOME=/opt/composer composer --quiet global require drush/drush:dev-master &&     ln -s /opt/composer/vendor/drush/drush/drush /bin/drush' returned a non-zero code: 2

I managed to fix this changing
COMPOSER_HOME=/opt/composer composer --quiet global require drush/drush:dev-master
to
COMPOSER_HOME=/opt/composer composer --quiet global require drush/drush:8.*`

but probably could be better the idea try to satisfy that unmet dep.

Once changed that and restarted the build, it stops add this https://github.com/Boran/docker-drupal/blob/master/Dockerfile#L119
Where do that /files/drupal-7 folder is meant to be?

Thanks.

add some way to run a final script at the end of the build

boran/drupal docker image and webfact: add some way to run a final script at the end of the build.

DRUPAL_FINALCOMMAND is getting too short in the drupal UI, and it is not subject to any versioning

e.g. call it DRUPAL_FINAL_SCRIPT adapt start.sh in boran/drupal. The referenced script would be available somewhere under /var/www/html e.g. from a repo or module..

External Database

Hi,

This is working great for me, thank you! One question, I want to provide a database for the container to use so that it's starting similar to live. Where do you put that / how can I get it to build with that database.

Thanks for the great script!

Issue with git downloading the DRUPAL_MAKE_REPO

When I run the command

sudo docker run -td -p 8003:80 -e "DRUPAL_MAKE_DIR=drupal-make1" -e "DRUPAL_MAKE_REPO=https://github.com/Boran/drupal-make1" -e "DRUPAL_MAKE_CMD=${DRUPAL_MAKE_DIR}/${DRUPAL_MAKE_DIR}.make ${DRUPAL_DOCROOT}" --name drupal8003 boran/drupal

it yields

fatal: unable to access 'https://github.com/Boran/drupal-make1/': Could not resolve host: github.com

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.