From 8755e73d32fd12bac4b95d511265f534cf15c40c Mon Sep 17 00:00:00 2001 From: SliverHorn Date: Tue, 7 Sep 2021 20:49:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20docker=20=E4=BD=BF=E7=94=A8go=20generate?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index 3481e8eb..b7f4b3a4 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -3,7 +3,11 @@ FROM golang:alpine WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server COPY . . -RUN go generate && go env && go build -o server . +RUN go env -w GO111MODULE=on +RUN go env -w GOPROXY=https://goproxy.cn,direct +RUN go env +RUN go mod tidy +RUN go build -o server . FROM alpine:latest LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"