From 00a12f03823e7afae837ecb5732f712c92e50918 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Sat, 13 Oct 2018 17:46:36 -0400 Subject: [PATCH] add cfssl Signed-off-by: Jess Frazelle --- cfssl/Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ latest-versions.sh | 1 + 2 files changed, 38 insertions(+) create mode 100644 cfssl/Dockerfile diff --git a/cfssl/Dockerfile b/cfssl/Dockerfile new file mode 100644 index 0000000..14e4c5b --- /dev/null +++ b/cfssl/Dockerfile @@ -0,0 +1,37 @@ +FROM golang:alpine AS builder + +ENV PATH /go/bin:/usr/local/go/bin:$PATH +ENV GOPATH /go + +RUN apk --no-cache add \ + gcc \ + git \ + libc-dev + + +ENV CFSSL_VERSION 1.3.2 + +RUN git clone --depth 1 --branch "$CFSSL_VERSION" https://github.com/cloudflare/cfssl.git /go/src/github.com/cloudflare/cfssl + +RUN set -x && \ + go get github.com/cloudflare/cfssl_trust/... && \ + go get github.com/GeertJohan/go.rice/rice && \ + cd /go/src/github.com/cloudflare/cfssl && rice embed-go -i=./cli/serve && \ + mkdir bin && cd bin && \ + go build ../cmd/cfssl && \ + go build ../cmd/cfssljson && \ + go build ../cmd/mkbundle && \ + go build ../cmd/multirootca && \ + echo "Build complete." + +FROM alpine:latest + +COPY --from=builder /go/src/github.com/cloudflare/cfssl_trust /etc/cfssl +COPY --from=builder /go/src/github.com/cloudflare/cfssl/bin/ /usr/bin + +WORKDIR /etc/cfssl + +EXPOSE 8888 + +ENTRYPOINT ["cfssl"] +CMD ["--help"] diff --git a/latest-versions.sh b/latest-versions.sh index 54441c5..35011f2 100755 --- a/latest-versions.sh +++ b/latest-versions.sh @@ -103,6 +103,7 @@ noelbundick/azure-cli-extension-noelbundick iovisor/bcc browsh-org/browsh certbot/certbot +cloudflare/cfssl hashicorp/consul coredns/coredns CouchPotato/CouchPotatoServer