degica / dockerfiles

Dockerfile collection
1 stars 1 forks source link

rails-buildpack:2.6 has ssl certificate issue of letsencrypt #11

Open essa opened 2 years ago

essa commented 2 years ago

rails-buildpack:2.6 fails apt-get update because of the certificate issue of letsencrypt.

$ docker run -ti degica/rails-buildpack:2.6 bash
# apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Ign:3 https://deb.nodesource.com/node_10.x buster InRelease
Hit:4 http://deb.debian.org/debian buster-updates InRelease
Err:5 https://deb.nodesource.com/node_10.x buster Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 23.192.45.81 443]
Reading package lists... Done
E: The repository 'https://deb.nodesource.com/node_10.x buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

This issue is reported at https://github.com/nodesource/distributions/issues/1266 and a workaround in a comment will solve the issue.

$ docker run -ti degica/rails-buildpack:2.6 bash
# apt-get update
...
E: The repository 'https://deb.nodesource.com/node_10.x buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
# echo $?
100
# apt-get install -y libgnutls30   # <<<==== This fixes the issue
# apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Get:4 https://deb.nodesource.com/node_10.x buster InRelease [4584 B]
Get:5 https://deb.nodesource.com/node_10.x buster/main amd64 Packages [767 B]
Fetched 5351 B in 1s (4546 B/s)
Reading package lists... Done
# echo $?
0
essa commented 2 years ago

I think just rebuilding the image will resolve the issue