wodby / docker4drupal

Docker-based Drupal stack
https://wodby.com/docker4drupal
MIT License
1.24k stars 535 forks source link

Drush not working in mounted codebase. Original config issues? #227

Closed McFateM closed 6 years ago

McFateM commented 6 years ago

I'm unable to get drush working with a mounted codebase. I'm certain this is due to configuration differences between the 'php' image and my existing codebase, which was built by someone else, using composer, a long time ago. The original/existing drush is almost certainly not properly configured (although it appears to work).

The error that I see is similar to the following, whenever I run drush in this docker4drupal instance...

docker-compose exec --user 82 php drush --version

Warning: require(/var/www/html/vendor/bin/includes/preflight.inc): failed to open stream: No such file or directory in /var/www/html/vendor/bin/drush.php on line 11

Call Stack:
    0.2038     399200   1. {main}() /var/www/html/vendor/bin/drush.php:0

Fatal error: require(): Failed opening required '/var/www/html/vendor/bin/includes/preflight.inc' (include_path='.:/usr/local/lib/php') in /var/www/html/vendor/bin/drush.php on line 11

In my existing codebase, drush expects to find the preflight.inc include file in /var/www/html/drupal/vendor/drush/drush/includes.

Can anyone suggest how I might correct the drush configuration and codebase inside my existing site so that it will work with docker4drupal?

Codebase

mounted codebase

Host OS

macOS Sierra (10.12.6)

Docker info output

Containers: 6
 Running: 6
 Paused: 0
 Stopped: 0
Images: 6
Server Version: 17.12.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.60-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: V2XW:RZQE:4QEN:CETD:MOH3:NQDI:VG2N:MAEU:WLY5:DH7K:ONEF:VXM4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 71
 Goroutines: 81
 System Time: 2018-01-09T17:26:51.406427768Z
 EventsListeners: 3
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3128
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Docker compose file

version: "2"

services:
  mariadb:
    image: wodby/mariadb:10.2-3.0.2
#    image: wodby/mariadb:10.1-3.0.2
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: drupal
      MYSQL_USER: drupal
      MYSQL_PASSWORD: drupal
    volumes:
      - ./mariadb-init:/docker-entrypoint-initdb.d          # Place init .sql file(s) here.
#      - /path/to/mariadb/data/on/host:/var/lib/mysql       # I want to manage volumes manually.

#  postgres:
#    image: wodby/postgres:10.1-1.2.0
##    image: wodby/postgres:9.6-1.2.0
#    environment:
#      POSTGRES_PASSWORD: password
#      POSTGRES_DB: drupal
#      POSTGRES_USER: drupal
#    volumes:
#      - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
#      - /path/to/postgres/data/on/host:/var/lib/postgresql/data # I want to manage volumes manually.

  php:
# 1. Images with vanilla Drupal – wodby/drupal:[DRUPAL_VERSION]-[PHP_VERSION]-[STABILITY_TAG].
#    image: wodby/drupal:8-7.1-3.3.2
#    image: wodby/drupal:8-7.0-3.3.2
#    image: wodby/drupal:7-7.1-3.3.2
#    image: wodby/drupal:7-7.0-3.3.2
#    image: wodby/drupal:7-5.6-3.3.2
#    image: wodby/drupal:6-5.6-3.3.2
#    image: wodby/drupal:6-5.3-3.3.2
# 2. Images without Drupal – wodby/drupal-php:[PHP_VERSION]-[STABILITY_TAG].
#    image: wodby/drupal-php:7.1-3.3.1
#    image: wodby/drupal-php:7.0-3.3.1
#    image: wodby/drupal-php:5.6-3.3.1
#    image: wodby/drupal-php:5.3-3.3.1
# 3. Images without Drupal – wodby/drupal-php:[PHP_VERSION]-[STABILITY_TAG]. Version for development (--enable-debug)
    image: wodby/drupal-php:7.1-dev-3.3.1
#    image: wodby/drupal-php:7.0-dev-3.3.1
#    image: wodby/drupal-php:5.6-dev-3.3.1
#    image: wodby/drupal-php:5.3-dev-3.3.1
    environment:
      PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
      PHP_FPM_CLEAR_ENV: "no"
      DB_HOST: mariadb
      DB_USER: drupal
      DB_PASSWORD: drupal
      DB_NAME: drupal
      DB_DRIVER: mysql
      PHP_XDEBUG: 1
      PHP_XDEBUG_DEFAULT_ENABLE: 1
      PHP_XDEBUG_REMOTE_CONNECT_BACK: 0
      PHP_XDEBUG_REMOTE_HOST: "10.254.254.254"
      PHP_XDEBUG_REMOTE_AUTOSTART: 1
#      PHP_XDEBUG_PROFILER_OUTPUT_DIR: /mnt/files/xdebug/profiler
#      PHP_XDEBUG_TRACE_OUTPUT_DIR: /mnt/files/xdebug/traces
#      PHP_BLACKFIRE: 1
    volumes:
#      - codebase:/var/www/html
      - ./:/var/www/html
# Options for macOS users (https://docker4drupal.readthedocs.io/en/latest/macos)
#      - codebase:/var/www/html:cached # User-guided caching
#      - docker-sync:/var/www/html # Docker-sync
## For Xdebug profiler files
#      - files:/mnt/files

  nginx:
# wodby/drupal-nginx:[DRUPAL_VERSION]-[NGINX_VERSION]-[STABILITY_TAG].
    image: wodby/drupal-nginx:8-1.13-3.0.2
#    image: wodby/drupal-nginx:7-1.13-3.0.2
#    image: wodby/drupal-nginx:6-1.13-3.0.2
#    image: wodby/drupal-nginx:8-1.12-3.0.2
#    image: wodby/drupal-nginx:7-1.12-3.0.2
#    image: wodby/drupal-nginx:6-1.12-3.0.2
    depends_on:
      - php
    environment:
      NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
      NGINX_ERROR_LOG_LEVEL: debug
      NGINX_BACKEND_HOST: php
      NGINX_SERVER_ROOT: /var/www/html/web
#      NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
    volumes:
#      - codebase:/var/www/html
      - ./:/var/www/html
## Options for macOS users (https://docker4drupal.readthedocs.io/en/latest/macos)
#      - codebase:/var/www/html:cached # User-guided caching
#      - docker-sync:/var/www/html # Docker-sync
    labels:
      - 'traefik.backend=nginx'
      - 'traefik.port=80'
      - 'traefik.frontend.rule=Host:drupal.docker.localhost'

#  apache:
#    image: wodby/php-apache:2.4-2.0.2
#    depends_on:
#      - php
#    environment:
#      APACHE_LOG_LEVEL: debug
#      APACHE_BACKEND_HOST: php
#      APACHE_SERVER_ROOT: /var/www/html/web
#    volumes:
#      - codebase:/var/www/html
## Options for macOS users (https://docker4drupal.readthedocs.io/en/latest/macos)
##      - codebase:/var/www/html:cached # User-guided caching
##      - docker-sync:/var/www/html # Docker-sync
#    labels:
#      - 'traefik.backend=apache'
#      - 'traefik.port=80'
#      - 'traefik.frontend.rule=Host:drupal.docker.localhost'

#  varnish:
#    image: wodby/drupal-varnish:4.1-2.2.1
#    depends_on:
#      - nginx
#    environment:
#      VARNISH_SECRET: secret
#      VARNISH_BACKEND_HOST: nginx
#      VARNISH_BACKEND_PORT: 80
#    labels:
#      - 'traefik.backend=varnish'
#      - 'traefik.port=6081'
#      - 'traefik.frontend.rule=Host:varnish.drupal.docker.localhost'

#  redis:
#    image: wodby/redis:4.0-2.1.4
##    image: wodby/redis:3.2-2.1.4

#  adminer:
#    image: wodby/adminer:4.3-1.1.0
#    environment:
#      ADMINER_SALT: adminer-salt
#    labels:
#      - 'traefik.backend=adminer'
#      - 'traefik.port=9000'
#      - 'traefik.frontend.rule=Host:adminer.drupal.docker.localhost'

#  pma:
#    image: phpmyadmin/phpmyadmin
#    environment:
#      PMA_HOST: mariadb
#      PMA_USER: drupal
#      PMA_PASSWORD: drupal
#      PHP_UPLOAD_MAX_FILESIZE: 1G
#      PHP_MAX_INPUT_VARS: 1G
#    labels:
#      - 'traefik.backend=pma'
#      - 'traefik.port=80'
#      - 'traefik.frontend.rule=Host:pma.drupal.docker.localhost'

#  solr:
## wodby/drupal-solr:[DRUPAL_VERSION]-[SOLR_VERSION]-[STABILITY_TAG].
#    image: wodby/drupal-solr:8-6.6-2.3.0
##    image: wodby/drupal-solr:8-6.5-2.3.0
##    image: wodby/drupal-solr:8-6.4-2.3.0
##    image: wodby/drupal-solr:8-6.3-2.3.0
##    image: wodby/drupal-solr:8-5.5-2.3.0
##    image: wodby/drupal-solr:8-7.0-2.3.0
##    image: wodby/drupal-solr:8-7.1-2.3.0
##    image: wodby/drupal-solr:7-5.4-2.3.0
#    environment:
#      SOLR_HEAP: 1024m
#    labels:
#      - 'traefik.backend=solr'
#      - 'traefik.port=8983'
#      - 'traefik.frontend.rule=Host:solr.drupal.docker.localhost'

  mailhog:
    image: mailhog/mailhog
    labels:
      - 'traefik.backend=mailhog'
      - 'traefik.port=8025'
      - 'traefik.frontend.rule=Host:mailhog.drupal.docker.localhost'

#  nodejs:
#    image: wodby/drupal-node:1.0-1.0.0
#    environment:
#       NODE_SERVICE_KEY: node-service-key
#    labels:
#      - 'traefik.backend=nodejs'
#      - 'traefik.port=8080'
#      - 'traefik.frontend.rule=Host:nodejs.drupal.docker.localhost'
#    volumes:
#      - ./path/to/your/single-page-app:/app
#    command: sh -c 'npm install && npm run start'

#  node:
#    image: node:alpine
#    working_dir: /app
#    labels:
#      - 'traefik.backend=node'
#      - 'traefik.port=3000'
#      - 'traefik.frontend.rule=Host:front.drupal.docker.localhost'
#    expose:
#      - "3000"
#    volumes:
#      - ./path/to/your/single-page-app:/app
#    command: sh -c 'npm install && npm run start'

#  memcached:
#    image: wodby/memcached:1.4-2.0.0

#  rsyslog:
#    image: wodby/rsyslog

#  athenapdf:
#    image: arachnysdocker/athenapdf-service:2.10.0
#    environment:
#      WEAVER_AUTH_KEY: weaver-auth-key
#      WEAVER_ATHENA_CMD: "athenapdf -S"
#      WEAVER_MAX_WORKERS: 10
#      WEAVER_MAX_CONVERSION_QUEUE: 50
#      WEAVER_WORKER_TIMEOUT: 90
#      WEAVER_CONVERSION_FALLBACK: false

#  blackfire:
#    image: blackfire/blackfire
#    environment:
#      BLACKFIRE_SERVER_ID: XXXXX
#      BLACKFIRE_SERVER_TOKEN: YYYYY

#  webgrind:
#    image: wodby/webgrind:1.5-1.0.0
#    environment:
#      WEBGRIND_PROFILER_DIR: /mnt/files/xdebug/profiler
#    labels:
#      - 'traefik.backend=webgrind'
#      - 'traefik.port=8080'
#      - 'traefik.frontend.rule=Host:webgrind.drupal.docker.localhost'
#    volumes:
#      - files:/mnt/files

  portainer:
    image: portainer/portainer
    command: --no-auth -H unix:///var/run/docker.sock
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    labels:
      - 'traefik.backend=portainer'
      - 'traefik.port=9000'
      - 'traefik.frontend.rule=Host:portainer.drupal.docker.localhost'

  traefik:
    image: traefik
    command: -c /dev/null --web --docker --logLevel=INFO
    ports:
      - '8000:80'
      # - '80:80'
      # - '8080:8080' # Dashboard
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

volumes:
  codebase:
## Docker-sync for macOS users
#  docker-sync:
#    external: true
## For Xdebug profiler
#  files:
McFateM commented 6 years ago

OK, looking at this differently and I think I see a way around this. I think I cut too deep when copying my existing codebase. I'm going to try my process again with a more shallow cut that hopefully will not interfere with the drush that is baked into the wodby/drupal-php:7.1-dev-3.3.1 image. I'll report back here if it works.

McFateM commented 6 years ago

Well, that worked as intended...but not without additional problems. My existing codebase is in what I believe to be an improperly constructed Drupal 8 instance, so I copied just the ../web portion of that codebase into the local directory where docker-compose.yml lives, and now when I do a 'docker-compose up -d' I am able to follow it successfully with...

docker-compose exec --user 82 php drush --version 
 Drush Version   :  8.1.15 

However, my site will no longer open in my browser. Now I'm getting this...

( ! )  Fatal error: require(): Failed opening required  '/var/www/html/web/../vendor/autoload.php'  (include_path='.:/usr/local/lib/php') in /var/www/html/web/autoload.php  on line 17
--
1 | 0.2062 | 421632 | {main}(  ) | .../index.php:0
2 | 0.2087 | 422008 | require_once( '/var/www/html/web/autoload.php' ) | .../index.php:14

Unfortunately, I don't understand composer well enough to know what the correct structure of all this should be, or how to fix it.

For reference, a "tree -L 3" of my existing/original site reads like this...

.
├── composer.json
├── composer.lock
├── drush
│   ├── policy.drush.inc
│   └── README.md
├── LICENSE
├── phpunit.xml.dist
├── README.md
├── scripts
│   └── composer
│       └── ScriptHandler.php
├── vendor
│   ├── alchemy
│   │   └── zippy
│   ├── asm89
│   │   └── stack-cors
│   ├── autoload.php
│   ├── behat
│   │   ├── mink
│   │   ├── mink-browserkit-driver
│   │   └── mink-goutte-driver
│   ├── bin
│   │   ├── drupal -> ../drupal/console/bin/drupal
│   │   ├── drush -> ../drush/drush/drush
│   │   ├── drush.complete.sh -> ../drush/drush/drush.complete.sh
│   │   ├── drush.launcher -> ../drush/drush/drush.launcher
│   │   ├── drush.php -> ../drush/drush/drush.php
│   │   ├── php-parse -> ../nikic/php-parser/bin/php-parse
│   │   ├── phpunit -> ../phpunit/phpunit/phpunit
│   │   └── psysh -> ../psy/psysh/bin/psysh
│   ├── composer
│   │   ├── autoload_classmap.php
│   │   ├── autoload_files.php
│   │   ├── autoload_namespaces.php
│   │   ├── autoload_psr4.php
│   │   ├── autoload_real.php
│   │   ├── autoload_static.php
│   │   ├── ClassLoader.php
│   │   ├── installed.json
│   │   ├── installers
│   │   ├── LICENSE
│   │   └── semver
│   ├── consolidation
│   │   ├── annotated-command
│   │   └── output-formatters
│   ├── cweagans
│   │   └── composer-patches
│   ├── dflydev
│   │   ├── dot-access-configuration
│   │   ├── dot-access-data
│   │   └── placeholder-resolver
│   ├── dnoegel
│   │   └── php-xdg-base-dir
│   ├── doctrine
│   │   ├── annotations
│   │   ├── cache
│   │   ├── collections
│   │   ├── common
│   │   ├── inflector
│   │   ├── instantiator
│   │   └── lexer
│   ├── drupal
│   │   ├── console
│   │   ├── console-core
│   │   ├── console-dotenv
│   │   ├── console-en
│   │   └── console-extend-plugin
│   ├── drupal-composer
│   │   └── drupal-scaffold
│   ├── drush
│   │   └── drush
│   ├── easyrdf
│   │   └── easyrdf
│   ├── egulias
│   │   └── email-validator
│   ├── fabpot
│   │   └── goutte
│   ├── gabordemooij
│   │   └── redbean
│   ├── guzzlehttp
│   │   ├── guzzle
│   │   ├── promises
│   │   └── psr7
│   ├── html2text
│   │   └── html2text
│   ├── jakub-onderka
│   │   ├── php-console-color
│   │   └── php-console-highlighter
│   ├── jcalderonzumba
│   │   ├── gastonjs
│   │   └── mink-phantomjs-driver
│   ├── masterminds
│   │   └── html5
│   ├── mikey179
│   │   └── vfsStream
│   ├── nikic
│   │   └── php-parser
│   ├── paragonie
│   │   └── random_compat
│   ├── pear
│   │   └── console_table
│   ├── phpdocumentor
│   │   └── reflection-docblock
│   ├── phpspec
│   │   └── prophecy
│   ├── phpunit
│   │   ├── php-code-coverage
│   │   ├── php-file-iterator
│   │   ├── php-text-template
│   │   ├── php-timer
│   │   ├── php-token-stream
│   │   ├── phpunit
│   │   └── phpunit-mock-objects
│   ├── psr
│   │   ├── cache
│   │   ├── http-message
│   │   ├── log
│   │   └── simple-cache
│   ├── psy
│   │   └── psysh
│   ├── sebastian
│   │   ├── comparator
│   │   ├── diff
│   │   ├── environment
│   │   ├── exporter
│   │   ├── global-state
│   │   ├── recursion-context
│   │   └── version
│   ├── stack
│   │   └── builder
│   ├── stecman
│   │   └── symfony-console-completion
│   ├── swiftmailer
│   │   └── swiftmailer
│   ├── symfony
│   │   ├── browser-kit
│   │   ├── cache
│   │   ├── class-loader
│   │   ├── config
│   │   ├── console
│   │   ├── css-selector
│   │   ├── debug
│   │   ├── dependency-injection
│   │   ├── dom-crawler
│   │   ├── event-dispatcher
│   │   ├── expression-language
│   │   ├── filesystem
│   │   ├── finder
│   │   ├── http-foundation
│   │   ├── http-kernel
│   │   ├── polyfill-apcu
│   │   ├── polyfill-iconv
│   │   ├── polyfill-mbstring
│   │   ├── process
│   │   ├── psr-http-message-bridge
│   │   ├── routing
│   │   ├── serializer
│   │   ├── translation
│   │   ├── validator
│   │   ├── var-dumper
│   │   └── yaml
│   ├── symfony-cmf
│   │   └── routing
│   ├── twig
│   │   └── twig
│   ├── vlucas
│   │   └── phpdotenv
│   ├── webflo
│   │   └── drupal-finder
│   ├── webmozart
│   │   ├── assert
│   │   └── path-util
│   └── zendframework
│       ├── zend-diactoros
│       ├── zend-escaper
│       ├── zend-feed
│       └── zend-stdlib
└── web
    ├── autoload.php
    ├── composer.json
    ├── composer.lock
    ├── core
    │   ├── assets
    │   ├── authorize.php
    │   ├── CHANGELOG.txt
    │   ├── composer.json
    │   ├── config
    │   ├── COPYRIGHT.txt
    │   ├── core.api.php
    │   ├── core.libraries.yml
    │   ├── core.link_relation_types.yml
    │   ├── core.services.yml
    │   ├── globals.api.php
    │   ├── includes
    │   ├── INSTALL.mysql.txt
    │   ├── INSTALL.pgsql.txt
    │   ├── install.php
    │   ├── INSTALL.sqlite.txt
    │   ├── INSTALL.txt
    │   ├── lib
    │   ├── LICENSE.txt
    │   ├── MAINTAINERS.txt
    │   ├── misc
    │   ├── modules
    │   ├── package.json
    │   ├── phpcs.xml.dist
    │   ├── phpunit.xml.dist
    │   ├── profiles
    │   ├── rebuild.php
    │   ├── scripts
    │   ├── tests
    │   ├── themes
    │   ├── UPDATE.txt
    │   └── yarn.lock
    ├── example.gitignore
    ├── index.php
    ├── libraries
    │   ├── ckeditor.autogrow
    │   ├── ckeditor.fakeobjects
    │   ├── ckeditor.image
    │   ├── ckeditor.link
    │   ├── codemirror
    │   ├── jquery.geocomplete
    │   ├── jquery.icheck
    │   ├── jquery.image-picker
    │   ├── jquery.inputmask
    │   ├── jquery.intl-tel-input
    │   ├── jquery.rateit
    │   ├── jquery.select2
    │   ├── jquery.timepicker
    │   ├── jquery.toggles
    │   ├── jquery.word-and-character-counter
    │   ├── pdf.js
    │   ├── progress-tracker
    │   └── signature_pad
    ├── LICENSE.txt
    ├── modules
    │   └── contrib
    ├── profiles
    ├── README.txt
    ├── robots.txt
    ├── rootstalk.sql
    ├── sites
    │   ├── default
    │   ├── development.services.yml
    │   ├── example.settings.local.php
    │   └── example.sites.php
    ├── themes
    │   ├── bootstrap_rootstalk
    │   ├── bootstrap_rootstalk.backup
    │   └── contrib
    ├── update.php
    ├── vendor
    │   ├── asm89
    │   ├── autoload.php
    │   ├── behat
    │   ├── bin
    │   ├── composer
    │   ├── doctrine
    │   ├── drupal
    │   ├── easyrdf
    │   ├── egulias
    │   ├── fabpot
    │   ├── guzzlehttp
    │   ├── ircmaxell
    │   ├── jcalderonzumba
    │   ├── masterminds
    │   ├── mikey179
    │   ├── paragonie
    │   ├── phpdocumentor
    │   ├── phpspec
    │   ├── phpunit
    │   ├── psr
    │   ├── sebastian
    │   ├── squizlabs
    │   ├── stack
    │   ├── symfony
    │   ├── symfony-cmf
    │   ├── twig
    │   ├── web.config
    │   ├── webmozart
    │   ├── wikimedia
    │   └── zendframework
    └── web.config

Note that /vendor and /vendor/autoload.php occur TWICE here, at ./vendor/autoload.php AND at ./web/vendor/autoload.php. The codebase I copied this time includes everything under ./web, but no longer includes ./vendor and its contents. Is this "correct"?

McFateM commented 6 years ago

My apologies... This is clearly not a docker4drupal issue, and I'm sorry for the moving target here, but I thought I should post my progress in case it helps others, or prompts better suggestions.

So, I was able to remove ALL redundant composer packages from my "original" site (not my docker4drupal copy) such that there are no longer ANY ../web/vendor/* or ../web/composer.json files. The original site shows no signs of problems so that's a good thing, I believe.

Now that I'm creating my docker4drupal instance of this site from a "reasonable" original, all seems to be working properly (the site behaves properly and drush works too) with one exception...

When I shell into my php container and execute 'drush --version' and 'drush cr all' I get this...

/var/www/html/web/sites/default$ drush --version
A non-numeric value encountered preflight.inc:468                      [warning]
 D     8 
 r  :  . 
 u     1 
 s     . 
 h     1 
 V     5 
 e       
 r       
 s       
 i       
 o       
 n       

/var/www/html/web/sites/default$ drush cr all
A non-numeric value encountered preflight.inc:468                      [warning]
Cache             [ok]
rebuild
complete.

That's not a typo, the output is literally formatted just as you see it above. Anyone have a clue what the root of this problem is, and how I might fix it?

I'm looking into the non-numeric warning (appears to be something related to PHP 7.1?) and any other clues I can find now. Thanks.

camerongreen commented 6 years ago

I get exactly the same thing as @McFateM. Other commands output fine, but when I run drush I get this weird vertical text thing. It makes it virtually impossible to use.

As a workaround, put this in the environment section of your docker-compose: COLUMNS: 80 Or run drush with the number of columns you want as an environmental variable. COLUMNS=80 drush --version

Running stretch/sid unbuntu with docker version 17.12.0-ce, build c97c6d6

tanc commented 6 years ago

I also see this annoying formatting issue when running drush commands. Thank you @camerongreen for the workaround.

iampuma commented 6 years ago

Adding the COLUMNS: 80 variable indeed solves the warning. Thanks.

shrop commented 6 years ago

Seems like we should add COLUMNS: 80 to docker-compose.yml

csandanov commented 6 years ago

We have make shell command that pass through $COLUMS and $LINES from host https://github.com/wodby/docker4drupal/issues/273#issuecomment-384952750