build(container):编译用容器镜像改用国内镜像。
This commit is contained in:
parent
0d73665313
commit
b2e4fb809f
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.19-alpine AS builder
|
FROM dockerproxy.com/library/golang:1.20-alpine AS builder
|
||||||
|
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
ENV GOPROXY="https://goproxy.io"
|
ENV GOPROXY="https://goproxy.io"
|
||||||
|
@ -9,7 +9,7 @@ RUN go mod download && go mod verify
|
||||||
ADD . /app
|
ADD . /app
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -tags=jsoniter -v -o server .
|
RUN CGO_ENABLED=0 GOOS=linux go build -tags=jsoniter -v -o server .
|
||||||
|
|
||||||
FROM alpine:latest AS production
|
FROM dockerproxy.com/library/alpine:latest AS production
|
||||||
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories
|
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user