check go.mod before build docker image (#225)
This commit is contained in:
@@ -18,6 +18,7 @@ ENV GOPROXY https://goproxy.cn,direct
|
|||||||
|
|
||||||
WORKDIR /build/zero
|
WORKDIR /build/zero
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN sh -c "[ -f go.mod ]" || exit
|
||||||
COPY {{.goRelPath}}/etc /app/etc
|
COPY {{.goRelPath}}/etc /app/etc
|
||||||
RUN go build -ldflags="-s -w" -o /app/{{.exeFile}} {{.goRelPath}}/{{.goFile}}
|
RUN go build -ldflags="-s -w" -o /app/{{.exeFile}} {{.goRelPath}}/{{.goFile}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user