Browse Source

fix: docker 使用go generate有问题

main
SliverHorn 3 years ago
parent
commit
8755e73d32
  1. 6
      server/Dockerfile

6
server/Dockerfile

@ -3,7 +3,11 @@ FROM golang:alpine
WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
COPY . . 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 FROM alpine:latest
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com" LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"

Loading…
Cancel
Save