使用 docker?alpine鏡像包時(shí)候發(fā)現(xiàn) golang get 報(bào)錯(cuò)?x509: certificate signed by unknown authority
經(jīng)過(guò)研究發(fā)現(xiàn)是 ca 證書(shū)問(wèn)題
dockerfile 添加下面代碼
# 添加 ca 證書(shū)
RUN apk add --update ca-certificates && \
? ? rm -rf /var/cache/apk/* /tmp/*
RUN update-ca-certificates