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

master
Kevin Wan 4 years ago committed by GitHub
parent 6e57f6c527
commit 8d4951c990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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}}

Loading…
Cancel
Save