Failed to run client service of API Platform 2.5.7 in Docker with dev:ssl error (conflict with current master)

Viewed 637

I started off all fresh with downloading and unpacking the latest release of API Platform 2.5.7, a fresh Docker for Mac install on my Macbook Pro with a freshly installed Catalina and keep running into the following error, after having docker-compose pull followed by docker-compose up -d.

All other services are up and running (green in the Docker client), only the API Platform client remains grey with the following message in the service's logs:

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.

It is not a timeout issue, although I ran the following to double the timeout.

export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120

What am I missing here, there's not much out on the web on this so I must be ignoring some trivial things?

P.S. I think there's a download of the master version Dockerfile for the client happening, since the 2.5.7 doesn't include anything that points at dev:ssl.

P.S.S. The certificate installation seems to have gone well, see the logs of that part below

P.P.S.S. Although I can access the admin service, just like the api service for instance, I fail to access the dev-tls service through the browser. https://localhost:80 yields in a

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.

I believe that this might be linked to my problem.

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
1 Answers

edit out docker/dev-tls/Dockerfile and add in line 23: mkcert -install; \

then build your images again, worked for me

Related