mirror of
https://github.com/dockersrc/go
synced 2026-06-24 14:01:08 -04:00
🐛 Force IPv4 in 05-custom.sh to fix GitHub API SSL failure 🐛
The casjaysdev/alpine base image routes *.github.com IPv6 addresses through casjay.in infrastructure, which presents CN=casjay.in instead of GitHub's certificate. curl -fsSL to api.github.com resolves to 2402:d0c0:12:e04e::1 and fails with "no alternative certificate subject name matches target hostname api.github.com". Standard alpine:latest uses the IPv4 address 140.82.114.6 and succeeds. Fix: write "-4" to /root/.curlrc at the top of 05-custom.sh so every curl call in the script (including the golangci-lint installer sub-script) uses IPv4. Build now completes successfully. - rootfs/root/docker/setup/05-custom.sh: add printf '-4' > /root/.curlrc before any network calls rootfs/root/docker/setup/05-custom.sh
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
# Set bash options
|
||||
set -eo pipefail
|
||||
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
||||
# Force IPv4 for all curl calls in this script — the base image IPv6 routing
|
||||
# intercepts *.github.com and presents a cert for casjay.in, causing SAN mismatch
|
||||
printf -- '-4\n' > /root/.curlrc
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set env variables
|
||||
exitCode=0
|
||||
|
||||
Reference in New Issue
Block a user