Dockerfile 701 B

123456789101112131415161718192021222324252627282930
  1. # vim: se syn=dockerfile:
  2. FROM golang:1.12.4-alpine AS build
  3. ENV CGO_ENABLED 0
  4. RUN apk add --no-cache --update make git perl-utils dep shadow
  5. ARG CACHE_BUSTER="wat"
  6. ENV PATH "/go/bin:${PATH}"
  7. RUN go get honnef.co/go/tools/cmd/staticcheck
  8. RUN mkdir -p /go/src/github.com/joyent/conch-shell/
  9. WORKDIR /go/src/github.com/joyent/conch-shell/
  10. ARG VCS_REF="master"
  11. ARG VERSION="v0.0.0-dirty"
  12. LABEL org.label-schema.vcs-ref $VCS_REF
  13. LABEL org.label-schema.version $VERSION
  14. COPY . /go/src/github.com/joyent/conch-shell/
  15. RUN make
  16. FROM scratch
  17. COPY --from=build /go/src/github.com/joyent/conch-shell/bin/conch /bin/conch
  18. COPY --from=build /etc/ssl /etc/ssl
  19. ENTRYPOINT [ "/bin/conch" ]
  20. CMD ["version"]