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.

31 lines
694 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 build -o gva cmd/main.go
  13. RUN go env && go build -o server .
  14. FROM alpine:latest
  15. LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
  16. WORKDIR /go/src/gin-vue-admin
  17. COPY --from=0 /go/src/gin-vue-admin/gva ./
  18. COPY --from=0 /go/src/gin-vue-admin/server ./
  19. COPY --from=0 /go/src/gin-vue-admin/config.yaml ./
  20. COPY --from=0 /go/src/gin-vue-admin/resource ./resource
  21. EXPOSE 8888
  22. ENTRYPOINT ./gva initdb && ./server