check go.mod before build docker image (#225)

This commit is contained in:
Kevin Wan
2020-11-24 23:19:31 +08:00
committed by GitHub
parent 6e57f6c527
commit 8d4951c990

View File

@@ -18,6 +18,7 @@ ENV GOPROXY https://goproxy.cn,direct
WORKDIR /build/zero
COPY . .
RUN sh -c "[ -f go.mod ]" || exit
COPY {{.goRelPath}}/etc /app/etc
RUN go build -ldflags="-s -w" -o /app/{{.exeFile}} {{.goRelPath}}/{{.goFile}}