forked from jessfraz/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 896 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 v1.4.1
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"]