Dockerfile.minimal 891 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM alpine:3.5
  2. ENV PATH /go/bin:/usr/local/go/bin:$PATH
  3. ENV GOPATH /go
  4. ENV USER root
  5. COPY . /go/src/github.com/cloudflare/cfssl
  6. RUN buildDeps=' \
  7. go \
  8. git \
  9. gcc \
  10. libc-dev \
  11. libtool \
  12. libgcc \
  13. ' \
  14. set -x && \
  15. apk update && \
  16. apk add $buildDeps && \
  17. cd /go/src/github.com/cloudflare/cfssl && \
  18. go get github.com/GeertJohan/go.rice/rice && rice embed-go -i=./cli/serve && \
  19. cp -R /go/src/github.com/cloudflare/cfssl/vendor/github.com/cloudflare/cfssl_trust /etc/cfssl && \
  20. go build -o /usr/bin/cfssl ./cmd/cfssl && \
  21. go build -o /usr/bin/cfssljson ./cmd/cfssljson && \
  22. go build -o /usr/bin/mkbundle ./cmd/mkbundle && \
  23. go build -o /usr/bin/multirootca ./cmd/multirootca && \
  24. apk del $buildDeps && \
  25. rm -rf /var/cache/apk/* && \
  26. rm -rf /go && \
  27. echo "Build complete."
  28. VOLUME [ "/etc/cfssl" ]
  29. WORKDIR /etc/cfssl
  30. EXPOSE 8888
  31. ENTRYPOINT ["cfssl"]
  32. CMD ["--help"]