Mac M1 上带有 docker 技术预览的 DDEV 预发布不起作用 - docker 损坏
DDEV prerelease on Mac M1 with docker tech preview doesn't work - docker broken
我已经使用 DDEV 大约 2 周了,使用自定义本地域名没有任何问题,直到昨天我的一个项目崩溃了,一切都很好。
重新启动 DDEV 后,当尝试转到任何自定义本地域时,例如 dash.myproject.com,它会导致 500 nginx 错误。
如果我去ip地址https://127.0.0.1:56248
我的浏览器自动解析为 http://
我得到:
400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx
如果我再次在浏览器中使用前缀 https 手动更新 ip 地址 (https://127.0.0.1:56248),它会恢复我的本地站点。
我的项目 DDEV 配置:
name: DashboardV2
type: laravel
docroot: public
php_version: "7.4"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames:
- dash.myproject.local
additional_fqdns:
- dash.myproject.local
mariadb_version: "10.2"
mysql_version: ""
provider: default
use_dns_when_possible: false
composer_version: ""
请问有人能帮我解决这个问题吗?
我什至在新项目中遇到了与示例项目相同的问题:
ddev poweroff && mkdir ~/tmp/testddev && cd ~/tmp/testddev && ddev config --project-type=php && ddev start
https://ddev.readthedocs.io/en/stable/users/troubleshooting/
(为上面添加了一个索引文件,在 127.0.0.1:port 上解析但得到 500 nginx 错误)
如果我 ddev logs
,这里是服务器的结果,但没有看到 500 错误参考:
+ set -o errexit nounset pipefail
+ rm -f /tmp/healthy
+ DDEV_PHP_VERSION=7.4
+ DDEV_WEBSERVER_TYPE=nginx-fpm
+ '[' -n 7.4 ']'
+ update-alternatives --set php /usr/bin/php7.4
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in manual mode
update-alternatives: warning: skip creation of /usr/share/man/man1/php.1.gz because associated file /usr/share/man/man1/php7.4.1.gz (of link group php) doesn't exist
+ ln -sf /usr/sbin/php-fpm7.4 /usr/sbin/php-fpm
+ export PHP_INI=/etc/php/7.4/fpm/php.ini
+ PHP_INI=/etc/php/7.4/fpm/php.ini
+ '[' '!' -z ']'
+ '[' -d /mnt/ddev_config/php ']'
+ '[' laravel = backdrop ']'
++ id -un
++ id -gn
+ printf '\nexport APACHE_RUN_USER=ryan\nexport APACHE_RUN_GROUP=dialout\n'
+ a2enmod access_compat alias auth_basic authn_core authn_file authz_core authz_host authz_user autoindex deflate dir env filter mime mpm_prefork negotiation reqtimeout rewrite setenvif status
Considering dependency authn_core for access_compat:
Module authn_core already enabled
Module access_compat already enabled
Module alias already enabled
Considering dependency authn_core for auth_basic:
Module authn_core already enabled
Module auth_basic already enabled
Module authn_core already enabled
Module authn_file already enabled
Module authz_core already enabled
Considering dependency authz_core for authz_host:
Module authz_core already enabled
Module authz_host already enabled
Considering dependency authz_core for authz_user:
Module authz_core already enabled
Module authz_user already enabled
Module autoindex already enabled
Considering dependency filter for deflate:
Module filter already enabled
Module deflate already enabled
Module dir already enabled
Module env already enabled
Module filter already enabled
Module mime already enabled
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Enabling module mpm_prefork.
Module negotiation already enabled
Module reqtimeout already enabled
Enabling module rewrite.
Module setenvif already enabled
Module status already enabled
To activate the new configuration, you need to run:
service apache2 restart
+ a2enconf charset localized-error-pages other-vhosts-access-log security serve-cgi-bin
Conf charset already enabled
Conf localized-error-pages already enabled
Conf other-vhosts-access-log already enabled
Conf security already enabled
Conf serve-cgi-bin already enabled
+ '[' nginx-fpm = apache-fpm ']'
+ '[' false = true ']'
+ disable_xdebug
Disabled xdebug
+ ls /var/www/html
+ sudo mkdir -p /mnt/ddev-global-cache/terminus/cache /mnt/ddev-global-cache/ddev-live
+ sudo mkdir -p /mnt/ddev-global-cache/bashhistory/DashboardV2-web
++ id -u
++ id -g
+ sudo chown -R 501:20 /mnt/ddev-global-cache/ /home/ryan/.ssh /home/ryan/.drush /home/ryan/.gitconfig /home/ryan/.my.cnf
+ '[' -d /mnt/ddev_config/.homeadditions ']'
+ cp -r /mnt/ddev_config/.homeadditions/. /home/ryan/
+ '[' -d /mnt/ddev_config/homeadditions ']'
+ cp -r /mnt/ddev_config/homeadditions/. /home/ryan/
+ sudo mkdir -p /mnt/ddev-global-cache/mkcert
+ sudo chmod -R ugo+rw /mnt/ddev-global-cache/mkcert
+ mkcert -install
Using the local CA at "/mnt/ddev-global-cache/mkcert" ✨
The local CA is now installed in the system trust store! ⚡️
+ sudo CAROOT=/mnt/ddev-global-cache/mkcert mkcert -cert-file /etc/ssl/certs/master.crt -key-file /etc/ssl/certs/master.key dashboardv2.ddev.site dash.reviews.local dash.reviews.local.ddev.site localhost 127.0.0.1 127.0.0.1 web ddev-DashboardV2-web ddev-DashboardV2-web.ddev_default
Using the local CA at "/mnt/ddev-global-cache/mkcert" ✨
Created a new certificate valid for the following names
- "dashboardv2.ddev.site"
- "dash.reviews.local"
- "dash.reviews.local.ddev.site"
- "localhost"
- "127.0.0.1"
- "127.0.0.1"
- "web"
- "ddev-DashboardV2-web"
- "ddev-DashboardV2-web.ddev_default"
The certificate is at "/etc/ssl/certs/master.crt" and the key at "/etc/ssl/certs/master.key" ✅
+ sudo chown 501 /etc/ssl/certs/master.crt /etc/ssl/certs/master.key
Server started
+ echo 'Server started'
+ exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord-nginx-fpm.conf
2021-03-26 13:31:15,767 INFO Included extra file "/etc/supervisor/php-fpm.conf" during parsing
2021-03-26 13:31:15,767 INFO Included extra file "/etc/supervisor/conf.d/mailhog.conf" during parsing
2021-03-26 13:31:15,767 INFO Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing
2021-03-26 13:31:15,768 INFO supervisord started with pid 1
2021-03-26 13:31:16,775 INFO spawned: 'child_exit_monitor' with pid 1644
2021-03-26 13:31:16,776 INFO spawned: 'php-fpm' with pid 1645
2021-03-26 13:31:16,776 INFO spawned: 'nginx' with pid 1646
2021-03-26 13:31:16,777 INFO spawned: 'mailhog' with pid 1647
[26-Mar-2021 13:31:16] NOTICE: fpm is running, pid 1645
[26-Mar-2021 13:31:16] NOTICE: ready to handle connections
[26-Mar-2021 13:31:16] NOTICE: systemd monitor interval set to 10000ms
2021-03-26 13:31:17,812 INFO success: child_exit_monitor entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-26 13:31:17,812 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-26 13:31:17,812 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-26 13:31:17,812 INFO success: mailhog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021/03/26 13:39:05 [info] 1652#1652: *20 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /login HTTP/1.1", host: "127.0.0.1:56248"
2021/03/26 13:39:05 [info] 1652#1652: *21 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:56248", referrer: "http://127.0.0.1:56248/login"
2021/03/26 13:40:03 [info] 1652#1652: *18 client timed out (110: Connection timed out) while waiting for request, client: 172.18.0.1, server: 0.0.0.0:443
2021/03/26 13:41:27 [info] 1652#1652: *31 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /login HTTP/1.1", host: "127.0.0.1:56248"
2021/03/26 13:41:27 [info] 1652#1652: *32 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:56248", referrer: "http://127.0.0.1:56248/login"
我使用的是 MacOS m1 BigSur,Docker 是 运行 3.3.0 (62029)。
如果您需要查看更多信息,请告诉我。
编辑 2021-04-13:当前的 Docker Desktop Tech Preview for Apple M1 (RC3) 与 ddev 配合良好。
我已经使用 DDEV 大约 2 周了,使用自定义本地域名没有任何问题,直到昨天我的一个项目崩溃了,一切都很好。
重新启动 DDEV 后,当尝试转到任何自定义本地域时,例如 dash.myproject.com,它会导致 500 nginx 错误。
如果我去ip地址https://127.0.0.1:56248 我的浏览器自动解析为 http:// 我得到:
400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx
如果我再次在浏览器中使用前缀 https 手动更新 ip 地址 (https://127.0.0.1:56248),它会恢复我的本地站点。
我的项目 DDEV 配置:
name: DashboardV2
type: laravel
docroot: public
php_version: "7.4"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames:
- dash.myproject.local
additional_fqdns:
- dash.myproject.local
mariadb_version: "10.2"
mysql_version: ""
provider: default
use_dns_when_possible: false
composer_version: ""
请问有人能帮我解决这个问题吗?
我什至在新项目中遇到了与示例项目相同的问题:
ddev poweroff && mkdir ~/tmp/testddev && cd ~/tmp/testddev && ddev config --project-type=php && ddev start
https://ddev.readthedocs.io/en/stable/users/troubleshooting/ (为上面添加了一个索引文件,在 127.0.0.1:port 上解析但得到 500 nginx 错误)
如果我 ddev logs
,这里是服务器的结果,但没有看到 500 错误参考:
+ set -o errexit nounset pipefail
+ rm -f /tmp/healthy
+ DDEV_PHP_VERSION=7.4
+ DDEV_WEBSERVER_TYPE=nginx-fpm
+ '[' -n 7.4 ']'
+ update-alternatives --set php /usr/bin/php7.4
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in manual mode
update-alternatives: warning: skip creation of /usr/share/man/man1/php.1.gz because associated file /usr/share/man/man1/php7.4.1.gz (of link group php) doesn't exist
+ ln -sf /usr/sbin/php-fpm7.4 /usr/sbin/php-fpm
+ export PHP_INI=/etc/php/7.4/fpm/php.ini
+ PHP_INI=/etc/php/7.4/fpm/php.ini
+ '[' '!' -z ']'
+ '[' -d /mnt/ddev_config/php ']'
+ '[' laravel = backdrop ']'
++ id -un
++ id -gn
+ printf '\nexport APACHE_RUN_USER=ryan\nexport APACHE_RUN_GROUP=dialout\n'
+ a2enmod access_compat alias auth_basic authn_core authn_file authz_core authz_host authz_user autoindex deflate dir env filter mime mpm_prefork negotiation reqtimeout rewrite setenvif status
Considering dependency authn_core for access_compat:
Module authn_core already enabled
Module access_compat already enabled
Module alias already enabled
Considering dependency authn_core for auth_basic:
Module authn_core already enabled
Module auth_basic already enabled
Module authn_core already enabled
Module authn_file already enabled
Module authz_core already enabled
Considering dependency authz_core for authz_host:
Module authz_core already enabled
Module authz_host already enabled
Considering dependency authz_core for authz_user:
Module authz_core already enabled
Module authz_user already enabled
Module autoindex already enabled
Considering dependency filter for deflate:
Module filter already enabled
Module deflate already enabled
Module dir already enabled
Module env already enabled
Module filter already enabled
Module mime already enabled
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Enabling module mpm_prefork.
Module negotiation already enabled
Module reqtimeout already enabled
Enabling module rewrite.
Module setenvif already enabled
Module status already enabled
To activate the new configuration, you need to run:
service apache2 restart
+ a2enconf charset localized-error-pages other-vhosts-access-log security serve-cgi-bin
Conf charset already enabled
Conf localized-error-pages already enabled
Conf other-vhosts-access-log already enabled
Conf security already enabled
Conf serve-cgi-bin already enabled
+ '[' nginx-fpm = apache-fpm ']'
+ '[' false = true ']'
+ disable_xdebug
Disabled xdebug
+ ls /var/www/html
+ sudo mkdir -p /mnt/ddev-global-cache/terminus/cache /mnt/ddev-global-cache/ddev-live
+ sudo mkdir -p /mnt/ddev-global-cache/bashhistory/DashboardV2-web
++ id -u
++ id -g
+ sudo chown -R 501:20 /mnt/ddev-global-cache/ /home/ryan/.ssh /home/ryan/.drush /home/ryan/.gitconfig /home/ryan/.my.cnf
+ '[' -d /mnt/ddev_config/.homeadditions ']'
+ cp -r /mnt/ddev_config/.homeadditions/. /home/ryan/
+ '[' -d /mnt/ddev_config/homeadditions ']'
+ cp -r /mnt/ddev_config/homeadditions/. /home/ryan/
+ sudo mkdir -p /mnt/ddev-global-cache/mkcert
+ sudo chmod -R ugo+rw /mnt/ddev-global-cache/mkcert
+ mkcert -install
Using the local CA at "/mnt/ddev-global-cache/mkcert" ✨
The local CA is now installed in the system trust store! ⚡️
+ sudo CAROOT=/mnt/ddev-global-cache/mkcert mkcert -cert-file /etc/ssl/certs/master.crt -key-file /etc/ssl/certs/master.key dashboardv2.ddev.site dash.reviews.local dash.reviews.local.ddev.site localhost 127.0.0.1 127.0.0.1 web ddev-DashboardV2-web ddev-DashboardV2-web.ddev_default
Using the local CA at "/mnt/ddev-global-cache/mkcert" ✨
Created a new certificate valid for the following names
- "dashboardv2.ddev.site"
- "dash.reviews.local"
- "dash.reviews.local.ddev.site"
- "localhost"
- "127.0.0.1"
- "127.0.0.1"
- "web"
- "ddev-DashboardV2-web"
- "ddev-DashboardV2-web.ddev_default"
The certificate is at "/etc/ssl/certs/master.crt" and the key at "/etc/ssl/certs/master.key" ✅
+ sudo chown 501 /etc/ssl/certs/master.crt /etc/ssl/certs/master.key
Server started
+ echo 'Server started'
+ exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord-nginx-fpm.conf
2021-03-26 13:31:15,767 INFO Included extra file "/etc/supervisor/php-fpm.conf" during parsing
2021-03-26 13:31:15,767 INFO Included extra file "/etc/supervisor/conf.d/mailhog.conf" during parsing
2021-03-26 13:31:15,767 INFO Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing
2021-03-26 13:31:15,768 INFO supervisord started with pid 1
2021-03-26 13:31:16,775 INFO spawned: 'child_exit_monitor' with pid 1644
2021-03-26 13:31:16,776 INFO spawned: 'php-fpm' with pid 1645
2021-03-26 13:31:16,776 INFO spawned: 'nginx' with pid 1646
2021-03-26 13:31:16,777 INFO spawned: 'mailhog' with pid 1647
[26-Mar-2021 13:31:16] NOTICE: fpm is running, pid 1645
[26-Mar-2021 13:31:16] NOTICE: ready to handle connections
[26-Mar-2021 13:31:16] NOTICE: systemd monitor interval set to 10000ms
2021-03-26 13:31:17,812 INFO success: child_exit_monitor entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-26 13:31:17,812 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-26 13:31:17,812 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-26 13:31:17,812 INFO success: mailhog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021/03/26 13:39:05 [info] 1652#1652: *20 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /login HTTP/1.1", host: "127.0.0.1:56248"
2021/03/26 13:39:05 [info] 1652#1652: *21 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:56248", referrer: "http://127.0.0.1:56248/login"
2021/03/26 13:40:03 [info] 1652#1652: *18 client timed out (110: Connection timed out) while waiting for request, client: 172.18.0.1, server: 0.0.0.0:443
2021/03/26 13:41:27 [info] 1652#1652: *31 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /login HTTP/1.1", host: "127.0.0.1:56248"
2021/03/26 13:41:27 [info] 1652#1652: *32 client sent plain HTTP request to HTTPS port while reading client request headers, client: 172.18.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:56248", referrer: "http://127.0.0.1:56248/login"
我使用的是 MacOS m1 BigSur,Docker 是 运行 3.3.0 (62029)。
如果您需要查看更多信息,请告诉我。
编辑 2021-04-13:当前的 Docker Desktop Tech Preview for Apple M1 (RC3) 与 ddev 配合良好。