実現したいこと
Docker 上の Alpine 3.7 を下記コマンドで起動した後に
shell
1docker run --rm -it alpine:3.7 /bin/ash
Alpine 内で下記コマンドを実行し
shell
1apk add curl 2curl -v 'https://pecl.php.net/'
下記のエラーが表示されずに HTTPレスポンス内容を表示されるようにしたい。
curl: (60) SSL certificate problem: certificate has expired More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
前提
Alpine 3.7 であることが必須です。例えば Alpine 3.15 ではこの問題は発生しませんが、今回の質問の対象外です。
また、curl コマンドに証明書を無視するオプションを追加したり、証明書のパスを引数として与えることも、今回の質問の対象外です。
shell
1docker run --rm -it alpine:3.7 /bin/ash
を行った後、Docker コンテナ内で何かのコマンドを実行し、
shell
1curl -v 'https://pecl.php.net/'
これがエラーにならないことが目標になります。
発生している問題・エラーメッセージ
% docker run --rm -it alpine:3.7 /bin/ash (git)-[master] / # apk add curl fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/aarch64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/aarch64/APKINDEX.tar.gz (1/4) Installing ca-certificates (20190108-r0) (2/4) Installing libssh2 (1.9.0-r1) (3/4) Installing libcurl (7.61.1-r3) (4/4) Installing curl (7.61.1-r3) Executing busybox-1.27.2-r11.trigger Executing ca-certificates-20190108-r0.trigger OK: 6 MiB in 17 packages / # curl -v 'https://pecl.php.net/' * Trying 104.236.228.160... * TCP_NODELAY set * Connected to pecl.php.net (104.236.228.160) port 443 (#0) * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS alert, certificate expired (557): * SSL certificate problem: certificate has expired * Closing connection 0 curl: (60) SSL certificate problem: certificate has expired More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. / #
試したこと

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2023/07/24 06:52
2023/07/24 07:32
2023/07/24 09:42
2023/07/27 06:04
2023/07/31 04:25