Docker image build failed: go mod download: reading https://api.bitbucket.org/2.0/repositories/***/***?fields=scm: 404 Not Found

huangapple go评论69阅读模式
英文:

Docker image build failed: go mod download: reading https://api.bitbucket.org/2.0/repositories/***/***?fields=scm: 404 Not Found

问题

构建Docker镜像刚刚开始失败。昨天还能正常工作。

这是出现的错误:

第14/31步:运行go mod download
---> 在9dcd36a5e81b中运行
go mod download: 读取https://api.bitbucket.org/2.0/repositories/***/***?fields=scm时出错:404 Not Found

注意:由于隐私问题,***被替换为工作区/项目名称和存储库名称。

英文:

Building of Docker image started to fail just now. It was working yesterday.

This is the error coming:

Step 14/31 : RUN go mod download
 ---> Running in 9dcd36a5e81b
go mod download: reading https://api.bitbucket.org/2.0/repositories/***/***?fields=scm: 404 Not Found

Note: *** is replaced for workspace/project name and repository name due to privacy.

答案1

得分: 4

将基础镜像中的Go版本从FROM golang:1.17.3-alpine as builder更新为FROM golang:1.17.8-alpine as builder解决了这个问题。

英文:

Updating the go version in the base image from FROM golang:1.17.3-alpine as builder to FROM golang:1.17.8-alpine as builder fixed the issue.

huangapple
  • 本文由 发表于 2022年3月25日 19:26:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/71616194.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定