我从下载和解压最新版本的API Platform 2.5.7开始,这是一个全新的Docker for Mac安装在我的Macbook Pro上,安装了一个新安装的Catalina,在使用docker-compose pull和docker-compose up -d之后,我一直运行以下错误。
所有其他服务都已启动并运行( Docker客户端中为绿色),只有API Platform客户端保持灰色,并在服务日志中显示以下消息:
yarn run v1.22.5
error Command "dev:ssl" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.这不是一个超时问题,尽管我运行了以下命令使超时时间加倍。
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120我在这里错过了什么,网上没有太多关于这个的信息,所以我一定忽略了一些微不足道的东西?
附注:我认为有一个download of the master version Dockerfile for the client happening,,因为2.5.7没有包含任何指向dev的东西:ssl。
附注:证书安装似乎进行得很顺利,请参阅下面该部分的日志
另外,虽然我可以访问管理服务,就像api服务一样,但我无法通过浏览器访问dev-tls服务。https://localhost:80的收益率在
Secure Connection Failed
An error occurred during a connection to localhost:80. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG.我相信这可能与我的问题有关。
Creating volume "abc_dev-certs" with default driver
Building dev-tls
Step 1/8 : ARG NGINX_VERSION=1.17
Step 2/8 : FROM nginx:${NGINX_VERSION}-alpine
1.17-alpine: Pulling from library/nginx
cbdbe7a5bc2a: Already exists
c554c602ff32: Pull complete
Digest: sha256:763e7f0188e378fef0c761854552c70bbd817555dc4de029681a2e972e25e30e
Status: Downloaded newer image for nginx:1.17-alpine
---> 89ec9da68213
Step 3/8 : RUN apk add --no-cache nss-tools ;
---> Running in e0c151182fb3
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/6) Installing nspr (4.24-r0)
(2/6) Installing libgcc (9.3.0-r0)
(3/6) Installing sqlite-libs (3.30.1-r2)
(4/6) Installing libstdc++ (9.3.0-r0)
(5/6) Installing nss (3.48-r0)
(6/6) Installing nss-tools (3.48-r0)
Executing busybox-1.31.1-r9.trigger
OK: 30 MiB in 43 packages
Removing intermediate container e0c151182fb3
---> 4895089ff1c6
Step 4/8 : WORKDIR /certs
---> Running in 3e49a528b4d3
Removing intermediate container 3e49a528b4d3
---> 6fdeb78536a9
Step 5/8 : ARG MKCERT_VERSION=1.4.1
---> Running in 632471b47035
Removing intermediate container 632471b47035
---> 1d4da3a96894
Step 6/8 : RUN set -eux; wget -O /usr/local/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v$MKCERT_VERSION/mkcert-v$MKCERT_VERSION-linux-amd64; chmod +x /usr/local/bin/mkcert; mkcert --cert-file localhost.crt --key-file localhost.key localhost 127.0.0.1 ::1 mercure; cat localhost.key localhost.crt > server.pem; cp "$(mkcert -CAROOT)/rootCA.pem" /certs/localCA.crt
---> Running in 89fd8efa2967
+ wget -O /usr/local/bin/mkcert https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-linux-amd64
Connecting to github.com (140.82.121.3:443)
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (52.216.114.227:443)
saving to '/usr/local/bin/mkcert'
mkcert 11% |*** | 543k 0:00:07 ETA
mkcert 42% |************* | 2022k 0:00:02 ETA
mkcert 92% |***************************** | 4469k 0:00:00 ETA
mkcert 100% |********************************| 4815k 0:00:00 ETA
'/usr/local/bin/mkcert' saved
+ chmod +x /usr/local/bin/mkcert
+ mkcert --cert-file localhost.crt --key-file localhost.key localhost 127.0.0.1 ::1 mercure
Created a new local CA at "/root/.local/share/mkcert" ?
Warning: the local CA is not installed in the system trust store! ⚠️
Run "mkcert -install" to avoid verification errors ‼️
Created a new certificate valid for the following names ?
- "localhost"
- "127.0.0.1"
- "::1"
- "mercure"
The certificate is at "localhost.crt" and the key at "localhost.key" ✅
+ cat localhost.key localhost.crt
+ mkcert -CAROOT
+ cp /root/.local/share/mkcert/rootCA.pem /certs/localCA.crt
Removing intermediate container 89fd8efa2967
---> ae6d06e250f8发布于 2020-11-16 04:28:56
编辑掉docker/dev-tls/Dockerfile并添加到第23行:mkcert -install; \
然后重新构建你的图像,这对我很有效
https://stackoverflow.com/questions/64803489
复制相似问题