forked from cloudflare/cfssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.minimal
45 lines (37 loc) · 1007 Bytes
/
Dockerfile.minimal
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
38
39
40
41
42
43
44
45
FROM alpine:3.2
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
ENV USER root
# Install pkcs11 deps
RUN apk update && apk add \
libltdl \
&& rm -rf /var/cache/apk/*
COPY . /go/src/github.com/cloudflare/cfssl
RUN buildDeps=' \
go \
git \
gcc \
libc-dev \
libtool \
libgcc \
' \
set -x && \
apk update && \
apk add $buildDeps && \
cd /go/src/github.com/cloudflare/cfssl && \
go get github.com/tools/godep && godep restore && \
go get github.com/GeertJohan/go.rice/rice && rice embed-go -i=./cli/serve && \
git clone https://github.com/cloudflare/cfssl_trust.git /etc/cfssl && \
go build -o /usr/bin/cfssl ./cmd/cfssl && \
go build -o /usr/bin/cfssljson ./cmd/cfssljson && \
go build -o /usr/bin/mkbundle ./cmd/mkbundle && \
go build -o /usr/bin/multirootca ./cmd/multirootca && \
apk del $buildDeps && \
rm -rf /var/cache/apk/* && \
rm -rf /go && \
echo "Build complete."
VOLUME [ "/etc/cfssl" ]
WORKDIR /etc/cfssl
EXPOSE 8888
ENTRYPOINT ["cfssl"]
CMD ["--help"]