fix: Dockerfile

This commit is contained in:
wolter 2024-11-05 16:30:44 +08:00
parent bdf42ccf99
commit ceacd302ac
1 changed files with 11 additions and 11 deletions

View File

@ -1,14 +1,14 @@
FROM registry.cn-chengdu.aliyuncs.com/go_ls/go-zero:v1 AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED 0
ENV GOPROXY https://goproxy.cn,direct
WORKDIR /src
COPY ../.. .
RUN go mod tidy
RUN go build -ldflags="-s -w" -o /src/cmd/api/yl cmd/api/yl.go
#FROM registry.cn-chengdu.aliyuncs.com/go_ls/go-zero:v1 AS builder
#
#LABEL stage=gobuilder
#ENV CGO_ENABLED 0
#ENV GOPROXY https://goproxy.cn,direct
#
#WORKDIR /src
#
#COPY ../.. .
#RUN go mod tidy
#RUN go build -ldflags="-s -w" -o /src/cmd/api/yl cmd/api/yl.go
FROM alpine AS runtime