问题不是由Go引起的,而是Alpine image。
默认的Alpine图片没有证书,因此该应用无法调用https地址(这种情况为https://accounts.google.com/o/oauth2/token)。
要解决此问题,请安装2个软件包
openssl和
ca-certificates。Dockerfile中的示例:
apk add --no-cache ca-certificates openssl

问题不是由Go引起的,而是Alpine image。
默认的Alpine图片没有证书,因此该应用无法调用https地址(这种情况为https://accounts.google.com/o/oauth2/token)。
要解决此问题,请安装2个软件包
openssl和
ca-certificates。Dockerfile中的示例:
apk add --no-cache ca-certificates openssl