dockerfile

This commit is contained in:
Rzy 2024-06-18 17:25:48 +08:00
parent 3718cdfcc2
commit 403ed83ca9
1 changed files with 3 additions and 4 deletions

View File

@ -4,8 +4,6 @@ LABEL stage=gobuilder
ENV CGO_ENABLED 0
ENV GOPROXY https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
WORKDIR /src
COPY ../.. .
@ -14,9 +12,10 @@ RUN go build -ldflags="-s -w" -o /src/cmd/rpc/transfer cmd/rpc/transfer.go
RUN go build -ldflags="-s -w" -o /src/cmd/rpc/queue/queue cmd/rpc/queue/queue.go
FROM alpine:latest AS runtime
RUN apk update --no-cache && apk add --no-cache supervisor
RUN apk add --no-cache make
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update && apk add supervisor
RUN apk add make
ENV TZ Asia/Shanghai
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /src /src