improve container build
Some checks failed
build container / build-container (push) Failing after 4m43s
Some checks failed
build container / build-container (push) Failing after 4m43s
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
FROM docker.io/library/golang:1.23-alpine
|
||||
ARG GOPROXY
|
||||
ARG GOPROXY=direct
|
||||
ARG ALPINE_MIRROR=https://mirrors.ustc.edu.cn
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN apk add git && env GOPROXY=${GOPROXY:-direct} go mod download
|
||||
RUN sed -i "s,https://dl-cdn.alpinelinux.org,${ALPINE_MIRROR}," /etc/apk/repositories; apk add git && env GOPROXY=${GOPROXY:-direct} go mod download
|
||||
ADD . /src
|
||||
RUN go build -o /cache-proxy ./cmd/proxy
|
||||
|
||||
|
Reference in New Issue
Block a user