docker golang build cache
Some checks failed
docker / build-docker (linux/amd64) (push) Successful in 2m29s
docker / build-docker (linux/arm64) (push) Failing after 3h11m32s

This commit is contained in:
royalcat 2024-06-19 18:00:57 +03:00
parent 0f7238c6a8
commit 08a36d8165

View file

@ -4,7 +4,7 @@ WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod go mod download all
COPY ./pkg ./pkg
COPY ./src ./src
@ -14,7 +14,7 @@ COPY ./templates ./templates
COPY embed.go embed.go
RUN go generate ./...
RUN CGO_ENABLED=0 go build -tags timetzdata -o /tstor ./cmd/tstor/main.go
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod CGO_ENABLED=0 go build -tags timetzdata -o /tstor ./cmd/tstor/main.go
FROM scratch