Comments (16)
I don't see a problem actually. The php container has a global installation of Drupal Console, just follow the instructions you get when you're using it.
Example:
docker run -ti wodby/drupal-php:7.0
Now you're in the container, the global DC installation is in your path, just missing some settings. Create them using
drupal init --override --no-interaction
Next step: download Drupal, e.g. using Drush:
drush dl drupal
cd drupal-8.2.1
Now, if you use DC, it tells you about the missing local installation. Add it, using Composer:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
composer update drupal/console --with-dependencies
Now there's a working local installation in your Drupal root, without having to add paths or anything else. Just use it:
drupal about
Or am I missing something?
from docker4drupal.
@wilfredwaltman I've rebuilt php containers, Drupal Console installed globally and initialized under www-data
user.
from docker4drupal.
Hmmm, thanks for that quick response. I pulled the new docker images but stil get the same errors. Start to think it is something I do wrong.
But when I do docker-compose exec php sh
en call "drupal" in that shell, or I do docker-compose exec --user 82 php drupal list
, I still get the same messages.
I was kind of expecting "drupal" to work just like the "drush" and "composer" command, which work fine.
from docker4drupal.
Could you share an output of the following commands:
- docker-compose pull
- docker-compose exec --user=82 php id
- docker-compose exec --user=82 php ls -la /usr/local/bin
from docker4drupal.
afaik, the latest versions of Drupal Console need to be installed as project dependency, not globally: https://github.com/hechoendrupal/DrupalConsole#download-as-new-dependency. The mentioned error shows that in fact it is installed globally, otherwise you wouldn't get this message. Just add it 'locally' to the project using composer require!
Source: https://twitter.com/drupalconsole/status/778602266341191681
from docker4drupal.
docker-compose pull
Pulling php (wodby/drupal-php:7.0)...
7.0: Pulling from wodby/drupal-php
214982d464b2: Already exists
14b376b33233: Pull complete
6b00500974ab: Pull complete
fb8fa6417cd9: Pull complete
dd8a17611d7b: Pull complete
425c53a15ff1: Pull complete
756acd9a4b35: Pull complete
58ef271d7752: Pull complete
efaff637f350: Pull complete
9f42697fe2b0: Pull complete
b40326f17595: Pull complete
e2ac1ddb0ed1: Pull complete
Digest: sha256:13e47b9d3149f26a0c4d108b86dae1ab524ac2ee15d90e81dfb3c45208d0ccd2
Status: Downloaded newer image for wodby/drupal-php:7.0
Pulling phantomjs (shufo/phantomjs:latest)...
latest: Pulling from shufo/phantomjs
d0ca440e8637: Already exists
2bb3cded8def: Already exists
Digest: sha256:e875bbe1aeb4a21363a78a20bbc1ec932c426c78fd5e2bd2374fb8bdcf153077
Status: Image is up to date for shufo/phantomjs:latest
Pulling nginx (wodby/drupal-nginx:latest)...
latest: Pulling from wodby/drupal-nginx
c0cb142e4345: Already exists
1a1fabde57d8: Pull complete
71d71572dd8e: Pull complete
1d8c62fe0495: Pull complete
75073c466db7: Pull complete
c7755c28932d: Pull complete
1b70cfe83245: Pull complete
171d29f01b6b: Pull complete
6fe00050d418: Pull complete
Digest: sha256:b95dd88089ca142e128c36496f3c7849928a0925e99bbc30775910ef35676051
Status: Downloaded newer image for wodby/drupal-nginx:latest
Pulling pma (phpmyadmin/phpmyadmin:latest)...
latest: Pulling from phpmyadmin/phpmyadmin
c0cb142e4345: Already exists
c21ab316f7a0: Pull complete
bfce1918eaca: Pull complete
30e078889fd4: Pull complete
302ef4dfe91d: Pull complete
0e9a6c95e13b: Pull complete
7428aacafdc3: Pull complete
Digest: sha256:24b0d808e71ec8a05fa2a569f18e5770b680ad0fe79195eb37f087448a725554
Status: Downloaded newer image for phpmyadmin/phpmyadmin:latest
Pulling mailhog (mailhog/mailhog:latest)...
latest: Pulling from mailhog/mailhog
Digest: sha256:ef74ed4c95466d4cbbd2c88d50f4050561383d5c4c50dfc53b96b2db767b309f
Status: Image is up to date for mailhog/mailhog:latest
Pulling mariadb (wodby/drupal-mariadb:latest)...
latest: Pulling from wodby/drupal-mariadb
Digest: sha256:62ebf6b03dda83c0504b278b3d53a059484346b984f63889bac19dbe65117240
Status: Image is up to date for wodby/drupal-mariadb:latest
docker-compose exec --user=82 php id
uid=82(www-data) gid=82(www-data) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
docker-compose exec --user=82 php ls -la /usr/local/bin
total 7932
drwxr-xr-x 3 root root 4096 Oct 14 12:47 .
drwxr-xr-x 10 root root 4096 Oct 14 12:47 ..
-rwxr-xr-x 1 root root 1704783 Oct 14 03:59 composer
drwxr-xr-x 2 root root 4096 Oct 14 12:47 console
-rwxr-xr-x 1 root root 805 Oct 14 03:59 docker-entrypoint.sh
-rwxr-xr-x 1 root root 525281 Oct 14 03:59 drupal
-rwxr-xr-x 1 root root 5867782 Oct 14 03:59 drush
from docker4drupal.
@drubb It looks like we should remove Drupal Console from the drupal-php image, because user should care about it by yourself.
from docker4drupal.
I'd leave it as it is. The advantage of a global installation is that it's easier to add it to the path. If Drupal Console works like Drush, a global installation will pass control to a local instance, if one is discovered. Also, the user is asked to install a local instance, as above.
from docker4drupal.
I've made some tests and It looks like Drupal Console doesn't work globally, so I suggest to remove it.
Another issue, there is no way (or I don't know how) to add ~/.composer/vendor/bin to $PATH in alpine. The modification of ~/.profile or ~/.shrc does not work. So, you should specify a full path ~/.composer/vendor/bin/drupal each time you want to call drupal for example.
from docker4drupal.
@PavelPrischepa see http://stackoverflow.com/questions/35325856/where-to-set-system-default-environment-variables-in-alpine-linux
from docker4drupal.
@andypost yes, it works but only if you logged in with sh --login
flag, otherwise /etc/profile
won't be loaded. It isn't usable for end users. It's possible to change entry point by ["/bin/sh", "--login"]
, but I actually don't know about potential side effects.
from docker4drupal.
@PavelPrischepa I prefer using ash --login
so looks this loads profile everytime, no side effects found.
About console - with d8.2 I can make it run only when it installed locally, so no more using it as global
from docker4drupal.
@drubb it looks Okay for me.
@wilfredwaltman have you still any questions or issues?
from docker4drupal.
@PavelPrischepa I got it working now. Couldn't at first because symfony/dom-crawler:3.1.4 was blocking it.
Once I got it down to 2.8.* I was able to install the Drupal Console. It's terribly slow in my installation but it's working. I will try this soon in a fresh install.
Thanks for checking and all the effort.
from docker4drupal.
Ok, I'm going to close the issue.
from docker4drupal.
Drupal Console display
[ERROR] SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
from docker4drupal.
Related Issues (20)
- ssmtp corrupting email attachments when server is under load HOT 1
- How to configure https in nginx HOT 1
- Can't write to Drupal files' directory
- Project root keeps changing to owner 100999:100999 on Ubuntu 20 HOT 3
- drush doesn't work properly with Drupal 10 HOT 1
- XDebug setup on WSL.
- How to use this for Drupal 8 site that requires Php 7.4 ? HOT 2
- The module automated_cron does not exist or is not installed
- Some containers could stop faster HOT 3
- You are using an incompatible Solr schema HOT 1
- File not found. 404 Error HOT 2
- Xdebug 3.2.x HOT 4
- How to add a module to a Built-in vanilla Drupal installation with the use of composer? HOT 2
- 404 not found with SSL mkcert and traefik HOT 1
- Full support form arm64 architecture? HOT 3
- Default installation with mounted database drupal gives error. How to proceed? HOT 2
- Not Recognizing Modules
- Error in compose file HOT 5
- Installation Problem
- Busybox sendmail is not working with mailhog and Drupal 10 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker4drupal.