2020-08-13 02:50:47 +00:00
|
|
|
FROM golang:alpine AS builder
|
|
|
|
|
|
|
|
RUN mkdir /src
|
|
|
|
ADD . /src
|
|
|
|
|
|
|
|
RUN apk add --no-cache make git curl && \
|
|
|
|
cd /src && \
|
|
|
|
make V=1 bin/step-ca
|
|
|
|
|
2019-05-08 19:26:21 +00:00
|
|
|
FROM smallstep/step-cli:latest
|
2018-11-15 01:53:17 +00:00
|
|
|
|
2020-08-13 02:50:47 +00:00
|
|
|
COPY --from=builder /src/bin/step-ca /usr/local/bin/step-ca
|
2018-11-15 01:53:17 +00:00
|
|
|
|
2019-03-27 02:00:13 +00:00
|
|
|
ENV CONFIGPATH="/home/step/config/ca.json"
|
2018-11-15 01:53:17 +00:00
|
|
|
ENV PWDPATH="/home/step/secrets/password"
|
|
|
|
|
2020-02-06 12:35:40 +00:00
|
|
|
USER root
|
|
|
|
RUN apk add --no-cache libcap && setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/step-ca
|
|
|
|
USER step
|
|
|
|
|
2019-03-27 02:00:13 +00:00
|
|
|
VOLUME ["/home/step"]
|
2018-11-15 01:53:17 +00:00
|
|
|
STOPSIGNAL SIGTERM
|
|
|
|
|
|
|
|
CMD exec /bin/sh -c "/usr/local/bin/step-ca --password-file $PWDPATH $CONFIGPATH"
|