Dockerfile.release 727 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # vim: se syn=dockerfile:
  2. FROM golang:1.13-alpine AS build
  3. ENV CGO_ENABLED 0
  4. RUN apk add --no-cache --update make git perl-utils dep shadow
  5. ARG UID="1000"
  6. ARG BRANCH="master"
  7. ENV GOPATH "/home/app/go"
  8. ENV PATH "${GOPATH}/bin:${PATH}"
  9. ENV GOCACHE "/home/app/.cache"
  10. RUN mkdir -p "${GOPATH}/src/github.com/joyent/"
  11. RUN chown -R $UID /home/app
  12. USER $UID
  13. ENV HOME "/home/app"
  14. RUN rm -rf release
  15. RUN rm -rf vendor
  16. RUN mkdir -p "${GOPATH}/src/github.com/joyent"
  17. WORKDIR "${GOPATH}/src/github.com/joyent/"
  18. RUN git clone --branch $BRANCH https://github.com/joyent/kosh kosh
  19. WORKDIR "${GOPATH}/src/github.com/joyent/kosh"
  20. RUN go get honnef.co/go/tools/cmd/staticcheck
  21. RUN id
  22. RUN env
  23. ENTRYPOINT ["make" ]
  24. CMD [ "release" ]