Dockerfile.release 693 B

123456789101112131415161718192021222324252627282930313233343536
  1. # vim: se syn=dockerfile:
  2. FROM golang:1.12.4-alpine
  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. WORKDIR "${GOPATH}/src/github.com/joyent/"
  15. RUN git clone --branch $BRANCH https://github.com/joyent/conch-shell conch-shell
  16. WORKDIR "${GOPATH}/src/github.com/joyent/conch-shell"
  17. RUN rm -rf release
  18. RUN rm -rf vendor
  19. RUN go get honnef.co/go/tools/cmd/staticcheck
  20. RUN id
  21. RUN env
  22. ENTRYPOINT ["make" ]
  23. CMD [ "release" ]