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.

28 lines
617 B

  1. FROM golang:alpine
  2. ENV GO111MODULE=on
  3. ENV GOPROXY=https://goproxy.io,direct
  4. WORKDIR /go/src/gin-vue-admin
  5. COPY server/ ./
  6. RUN cat ./config.yaml
  7. COPY .docker-compose/shell/server-handle.sh .
  8. RUN ls -al
  9. RUN sh ./server-handle.sh
  10. RUN rm -f server-handle.sh
  11. RUN cat ./config.yaml
  12. RUN go env && go mod tidy && go build -o server .
  13. FROM alpine:latest
  14. LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
  15. WORKDIR /go/src/gin-vue-admin
  16. COPY --from=0 /go/src/gin-vue-admin/server ./
  17. COPY --from=0 /go/src/gin-vue-admin/config.yaml ./
  18. COPY --from=0 /go/src/gin-vue-admin/resource ./resource
  19. EXPOSE 8888
  20. ENTRYPOINT ./server