You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
846 B
Docker
33 lines
846 B
Docker
6 months ago
|
FROM golang:alpine AS builder
|
||
|
|
||
|
WORKDIR /src
|
||
|
COPY . .
|
||
|
|
||
|
RUN apk add --no-cache curl git make libcap
|
||
|
RUN make V=1 build-fips
|
||
|
RUN setcap CAP_NET_BIND_SERVICE=+eip bin/step-ca.fips
|
||
|
|
||
|
FROM smallstep/step-kms-plugin:fips AS kms
|
||
|
|
||
|
FROM smallstep/step-cli:fips AS cli
|
||
|
|
||
|
FROM smallstep/alpine-fips
|
||
|
|
||
|
COPY --from=builder /src/bin/step-ca.fips /usr/local/bin/step-ca
|
||
|
COPY --from=kms /usr/local/bin/step-kms-plugin /usr/local/bin/step-kms-plugin
|
||
|
COPY --from=cli /usr/local/bin/step /usr/local/bin/step
|
||
|
|
||
|
USER step
|
||
|
|
||
|
ENV CONFIGPATH="/home/step/config/ca.json"
|
||
|
ENV PWDPATH="/home/step/secrets/password"
|
||
|
|
||
|
VOLUME ["/home/step"]
|
||
|
STOPSIGNAL SIGTERM
|
||
|
HEALTHCHECK CMD step ca health 2>/dev/null | grep "^ok" >/dev/null
|
||
|
|
||
|
COPY docker/entrypoint.sh /entrypoint.sh
|
||
|
|
||
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||
|
CMD exec /usr/local/bin/step-ca --password-file $PWDPATH $CONFIGPATH
|