Hello to everybody!
I have installed docker in Ubuntu 16.04 and Windows 10 pro. I use docker-compose and Laravel framework, the weird thing is that I can run “php artisan migrate” in Ubuntu without problems with the same docker-compose.yml, but in Windows return message “not found driver pdo”. I do all this from host, not container. Into container I have not got trouble.
I wonder why happens this issue, may be some body could help me.
I paste the yml file
Thanks
docker-compose.yml
version: '2’
services:
The Application
app:
build:
context: ./
dockerfile: app.dockerfile
working_dir: /var/www
volumes:
- ./:/var/www
environment:
- "DB_PORT=3306"
- "DB_HOST=database"
The Web Server
web:
build:
context: ./
dockerfile: web.dockerfile
working_dir: /var/www
volumes_from:
- app
ports:
- 8080:80
The Database
database:
image: mysql:5.7
volumes:
- dbdata:/var/lib/mysql
restart: always
environment:
- “MYSQL_ROOT_PASSWORD=secret”
- “MYSQL_DATABASE=motordb”
- “MYSQL_USER=pedro”
- "MYSQL_PASSWORD=secret"
ports:
- “33061:3306”
The PhpMyadmin
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- database:mysql
ports:
- 8181:80
environment:
PMA_USER: root
PMA_PASSWORD: secret
PMA_HOST: mysql
volumes:
dbdata:
Laravel environment file ".env"
APP_NAME=Motor
APP_ENV=local
APP_KEY=base64:0S0uQqTfYj02dsednm0S5iAPyNuF8uxWF50nX4opUKI=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=33061
DB_DATABASE=motordb
DB_USERNAME=pedro
DB_PASSWORD=secret
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=