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.

22 lines
523 B

4 years ago
4 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. RUN go env -w GOPROXY=https://goproxy.cn,direct
  6. RUN go env -w CGO_ENABLED=0
  7. RUN go env
  8. RUN go mod tidy
  9. RUN 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 ./
  14. EXPOSE 8888
  15. ENTRYPOINT ./server -c config.docker.yaml