windows下使用docker,提示could not find driver

本地win10环境下配置得docker环境安装得dnmp包github.com/yeszao/dnmp.git,
所有东西都是默认,搭建了laravel环境,数据库操作显示could not find driver,
进入php容器查看扩展
windows下使用docker,提示could not find driver
mysql扩展也有
下面是dnmp得env,php版本是7.4.27

#

PHP source directory

#
SOURCE_DIR=./www

#

Runtime data directory

#
DATA_DIR=./data

#

Container Timezone

#
TZ=Asia/Shanghai

#

Container package fetch url

#

Can be empty, followings or others:

mirrors.163.com

mirrors.aliyun.com

mirrors.ustc.edu.cn

dl-cdn.alpinelinux.org

#
CONTAINER_PACKAGE_URL=mirrors.ustc.edu.cn

#

#ALPINE
#
ALPINE_VERSION=3.12

#

Nginx

#
NGINX_VERSION=1.19.1-alpine
NGINX_HTTP_HOST_PORT=80
NGINX_HTTPS_HOST_PORT=443
NGINX_CONFD_DIR=./services/nginx/conf.d
NGINX_CONF_FILE=./services/nginx/nginx.conf
NGINX_FASTCGI_PHP_CONF=./services/nginx/fastcgi-php.conf
NGINX_FASTCGI_PARAMS=./services/nginx/fastcgi_params
NGINX_SSL_CERTIFICATE_DIR=./services/nginx/ssl
NGINX_LOG_DIR=./logs/nginx

Available apps: certbot

NGINX_INSTALL_APPS=

#

Openresty

#
OPENRESTY_VERSION=alpine
OPENRESTY_HTTP_HOST_PORT=80
OPENRESTY_HTTPS_HOST_PORT=443
OPENRESTY_CONFD_DIR=./services/openresty/conf.d
OPENRESTY_CONF_FILE=./services/openresty/openresty.conf
OPENRESTY_FASTCGI_PHP_CONF=./services/openresty/fastcgi-php.conf
OPENRESTY_CONF_FASTCGIPARAMS_FILE=./services/openresty/fastcgi_params
OPENRESTY_SSL_CERTIFICATE_DIR=./services/openresty/ssl
OPENRESTY_LOG_DIR=./logs/nginx

#

SUPERVISOR

#
SUPERVISOR_CONFIG=./services/supervisor/conf.d/
SUPERVISOR_LOG=./logs/supervisor
SUPERVISOR_CONF_FILE=./services/supervisor/supervisord.conf
SUPERVISOR_HOST_PORT_C=9001

#

PHP8

#

Available PHP_EXTENSIONS:

#

pdo_mysql,zip,pcntl,mysqli,mbstring,exif,bcmath,calendar,

sockets,gettext,shmop,sysvmsg,sysvsem,sysvshm,pdo_rebird,

pdo_dblib,pdo_oci,pdo_odbc,pdo_pgsql,pgsql,oci8,odbc,dba,

gd,intl,bz2,soap,xsl,xmlrpc,wddx,curl,readline,snmp,pspell,

recode,tidy,gmp,imap,ldap,imagick,sqlsrv,mcrypt,opcache,

redis,memcached,xdebug,swoole,pdo_sqlsrv,sodium,yaf,mysql,

amqp,mongodb,event,rar,ast,yac,yar,yaconf,msgpack,igbinary,

seaslog,varnish,xhprof,xlswriter,memcache,rdkafka,zookeeper,

psr,phalcon,sdebug,ssh2,yaml,protobuf,hprose

#

You can let it empty to avoid installing any extensions,

or install multi plugins as:

PHP_EXTENSIONS=pdo_mysql,mysqli,gd,curl,opcache

#
PHP80_VERSION=8.0.9
PHP80_PHP_CONF_FILE=./services/php80/php.ini
PHP80_FPM_CONF_FILE=./services/php80/php-fpm.conf
PHP80_LOG_DIR=./logs/php80
PHP80_EXTENSIONS=pdo_mysql,mysqli,mbstring,gd,curl,opcache

#

PHP7

#

Available PHP_EXTENSIONS:

#

pdo_mysql,zip,pcntl,mysqli,mbstring,exif,bcmath,calendar,

sockets,gettext,shmop,sysvmsg,sysvsem,sysvshm,pdo_rebird,

pdo_dblib,pdo_oci,pdo_odbc,pdo_pgsql,pgsql,oci8,odbc,dba,

gd,intl,bz2,soap,xsl,xmlrpc,wddx,curl,readline,snmp,pspell,

recode,tidy,gmp,imap,ldap,imagick,sqlsrv,mcrypt,opcache,

redis,memcached,xdebug,swoole,pdo_sqlsrv,sodium,yaf,mysql,

amqp,mongodb,event,rar,ast,yac,yar,yaconf,msgpack,igbinary,

seaslog,varnish,xhprof,xlswriter,memcache,rdkafka,zookeeper,

psr,phalcon,sdebug,ssh2,yaml,protobuf,hprose

#

You can let it empty to avoid installing any extensions,

or install multi plugins as:

PHP_EXTENSIONS=pdo_mysql,mysqli,gd,curl,opcache

#
PHP_VERSION=7.4.27
PHP_PHP_CONF_FILE=./services/php/php.ini
PHP_FPM_CONF_FILE=./services/php/php-fpm.conf
PHP_LOG_DIR=./logs/php
PHP_EXTENSIONS=pdo_mysql,mysqli,mbstring,gd,curl,opcache

#

PHP5.6

#
PHP56_VERSION=5.6.40
PHP56_PHP_CONF_FILE=./services/php56/php.ini
PHP56_FPM_CONF_FILE=./services/php56/php-fpm.conf
PHP56_LOG_DIR=./logs/php
PHP56_EXTENSIONS=pdo_mysql,mysqli,mbstring,gd,curl,opcache

#

PHP5.4

#
PHP54_VERSION=5.4.45
PHP54_PHP_CONF_FILE=./services/php54/php.ini
PHP54_FPM_CONF_FILE=./services/php54/php-fpm.conf
PHP54_LOG_DIR=./logs/php
PHP54_EXTENSIONS=pdo_mysql,mysqli,mbstring,gd,curl,opcache

#

RABBITMQ

Available RABBITMQ_PLUGINS:

rabbitmq_amqp1_0,rabbitmq_auth_backend_ldap,rabbitmq_auth_backend_http,rabbitmq_auth_mechanism_ssl,

rabbitmq_consistent_hash_exchange,rabbitmq_federation,rabbitmq_federation_management,rabbitmq_management,

rabbitmq_management_agent,rabbitmq_mqtt,rabbitmq_prometheus,rabbitmq_shovel,rabbitmq_shovel_management,

rabbitmq_stomp,rabbitmq_tracing,rabbitmq_trust_store,rabbitmq_web_stomp,rabbitmq_web_mqtt,

rabbitmq_web_stomp_examples,rabbitmq_web_mqtt_examples,rabbitmq_delayed_message_exchange

#
RABBITMQ_VERSION=management
RABBITMQ_CONF_FILE=./services/rabbitmq/rabbitmq.yml
RABBITMQ_HOST_PORT_C=5672
RABBITMQ_HOST_PORT_S=15672
RABBITMQ_DEFAULT_USER=myuser
RABBITMQ_DEFAULT_PASS=mypass
RABBITMQ_PLUGINS=rabbitmq_amqp1_0

#

MONGODB

#
MONGODB_VERSION=4.1
MONGODB_HOST_PORT=27017
MONGODB_INITDB_ROOT_USERNAME=root
MONGODB_INITDB_ROOT_PASSWORD=123456

#

ELASTICSEARCH

#

Available ELASTICSEARCH_PLUGINS:

#

amazon-ec2,analysis-icu,analysis-kuromoji,analysis-nori,

analysis-phonetic,analysis-smartcn,analysis-stempel,

analysis-ukrainian,discovery-azure-classic,discovery-ec2,

discovery-file,discovery-gce,google-cloud-storage,

ingest-attachment,ingest-geoip,ingest-user-agent,mapper-murmur3,

mapper-size,microsoft-azure-storage,qa,repository-azure,

repository-gcs,repository-hdfs,repository-s3,store-smb,

analysis-ik,analysis-pinyin

#

You can let it empty to avoid installing any plugins,

or install plugins as:

ELASTICSEARCH_PLUGINS=analysis-ik,analysis-pinyin

#
ELASTICSEARCH_VERSION=7.1.1
ELASTICSEARCH_CONF_FILE=./services/elasticsearch/elasticsearch.yml
ELASTICSEARCH_HOST_PORT_C=9200
ELASTICSEARCH_HOST_PORT_S=9300
ELASTICSEARCH_PLUGINS=analysis-ik

#

KIBANA

#
KIBANA_VERSION=7.1.1
KIBANA_HOST=5601
KIBANA_I18N_LOCALE=zh-CN

#

LOGSTASH

#
LOGSTASH_VERSION=7.1.1
LOGSTASH_HOST=5601
LOGSTASH_HOST_PORT_C=9600
LOGSTASH_HOST_PORT_S=5044

#

MySQL8

#
MYSQL_VERSION=8.0.28
MYSQL_HOST_PORT=3306
MYSQL_ROOT_PASSWORD=123456
MYSQL_ROOT_HOST=%
MYSQL_CONF_FILE=./services/mysql/mysql.cnf
MYSQL_LOG_DIR=./logs/mysql
#

MySQL5

#
MYSQL5_VERSION=5.7.28
MYSQL5_HOST_PORT=3305
MYSQL5_ROOT_PASSWORD=123456
MYSQL5_ROOT_HOST=%
MYSQL5_CONF_FILE=./services/mysql5/mysql.cnf
MYSQL5_LOG_DIR=./logs/mysql5

#

Redis

#
REDIS_VERSION=5.0.3-alpine
REDIS_HOST_PORT=6379
REDIS_CONF_FILE=./services/redis/redis.conf

#

Memcached

#
MEMCACHED_VERSION=alpine
MEMCACHED_HOST_PORT=11211
MEMCACHED_CACHE_SIZE=128

#

phpMyAdmin

#
PHPMYADMIN_HOST_PORT=8080
PHPMYADMIN_USER_CONF_FILE=./services/phpmyadmin/config.user.inc.php
PHPMYADMIN_PHP_CONF_FILE=./services/phpmyadmin/php-phpmyadmin.ini

#

redisMyAdmin

#
REDISMYADMIN_HOST_PORT=8081

#

AdminMongo

#
ADMINMONGO_HOST_PORT=1234

#

Node

#
NODE_VERSION=10.16.1-alpine

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
最佳答案

目测是不是没有pdo_mysql 试试下面的命令 docker-php-ext-install pdo_mysql

1周前 评论
oceanjiayu (楼主) 1周前
oceanjiayu (楼主) 1周前
讨论数量: 9
chowjiawei

env贴出来

1周前 评论
oceanjiayu (楼主) 1周前
chowjiawei (作者) 1周前
oceanjiayu (楼主) 1周前
chowjiawei

file

docker的mysql是否正常 laravel的env mysql地址是否写对 一般用docker可能地址是不同的 像laradock mysql的地址就是mysql 而不是localost或者127

1周前 评论
oceanjiayu (楼主) 1周前

目测是不是没有pdo_mysql 试试下面的命令 docker-php-ext-install pdo_mysql

1周前 评论
oceanjiayu (楼主) 1周前
oceanjiayu (楼主) 1周前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!