修改ci文件

This commit is contained in:
2022-06-15 12:55:19 +08:00
parent 05f8043672
commit 23261f0af5
8 changed files with 5 additions and 1352 deletions

View File

@@ -1,20 +1,18 @@
FROM golang:1.18 as builder
# 启用go module
ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn,direct
WORKDIR /builder
COPY . .
RUN go mod download && go build -o app && upx -9 app
RUN go mod download && go build -o app
RUN ls -lh && chmod +x ./app
COPY . .
# 指定OS等并go build
RUN GOOS=linux GOARCH=amd64 go build .
# 运行阶段指定scratch作为基础镜像
FROM alpine
WORKDIR /app