2020-08-13 02:50:47 +00:00
|
|
|
FROM golang:alpine AS builder
|
|
|
|
|
2020-09-02 16:30:45 +00:00
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
2020-08-13 02:50:47 +00:00
|
|
|
|
2022-04-25 12:25:31 +00:00
|
|
|
RUN apk add --no-cache curl git make
|
2022-10-20 00:55:18 +00:00
|
|
|
RUN make V=1 download
|
2022-04-25 12:25:31 +00:00
|
|
|
RUN make V=1 bin/step-ca bin/step-awskms-init bin/step-cloudkms-init
|
|
|
|
|
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
|
2022-04-25 12:25:31 +00:00
|
|
|
COPY --from=builder /src/bin/step-awskms-init /usr/local/bin/step-awskms-init
|
|
|
|
COPY --from=builder /src/bin/step-cloudkms-init /usr/local/bin/step-cloudkms-init
|
2018-11-15 01:53:17 +00:00
|
|
|
|
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
|
|
|
|
|
2020-09-02 16:30:45 +00:00
|
|
|
ENV CONFIGPATH="/home/step/config/ca.json"
|
|
|
|
ENV PWDPATH="/home/step/secrets/password"
|
2023-01-10 00:36:00 +00:00
|
|
|
ENV PROVISIONER_PWDPATH="/home/step/secrets/provisioner_password"
|
2020-09-02 16:30:45 +00:00
|
|
|
|
2019-03-27 02:00:13 +00:00
|
|
|
VOLUME ["/home/step"]
|
2018-11-15 01:53:17 +00:00
|
|
|
STOPSIGNAL SIGTERM
|
2020-09-08 16:44:35 +00:00
|
|
|
HEALTHCHECK CMD step ca health 2>/dev/null | grep "^ok" >/dev/null
|
2018-11-15 01:53:17 +00:00
|
|
|
|
2021-08-18 00:17:28 +00:00
|
|
|
COPY docker/entrypoint.sh /entrypoint.sh
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
2023-01-10 00:36:00 +00:00
|
|
|
CMD exec /usr/local/bin/step-ca --password-file $PWDPATH --provisioner-password-file $PROVISIONER_PWDPATH $CONFIGPATH
|