You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
736 B

5 years ago
5 years ago
  1. FROM golang:alpine as builder
  2. WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
  3. COPY . .
  4. RUN go env -w GO111MODULE=on \
  5. && go env -w GOPROXY=https://goproxy.cn,direct \
  6. && go env -w CGO_ENABLED=0 \
  7. && go env \
  8. && go mod tidy \
  9. && go build -o server .
  10. FROM alpine:latest
  11. LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
  12. WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
  13. COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/server ./
  14. COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/resource ./resource/
  15. COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/config.docker.yaml ./
  16. EXPOSE 8888
  17. ENTRYPOINT ./server -c config.docker.yaml