37 lines
845 B
Docker
37 lines
845 B
Docker
FROM alpine:latest as generator
|
|
|
|
RUN --network=host apk add \
|
|
cmd:openssl
|
|
|
|
ADD x509v3_config /tmp/x509v3_config
|
|
|
|
RUN mkdir -p "/redxen.eu/certs"
|
|
RUN mkdir -p "/redxen.eu/keys"
|
|
|
|
WORKDIR "/redxen.eu"
|
|
|
|
ADD gen-cert.sh /tmp/gen-cert.sh
|
|
|
|
# Server
|
|
RUN \
|
|
--mount=type=bind,from=redxen.eu/data/ca:latest,src=/redxen.eu,dst=/ca \
|
|
/tmp/gen-cert.sh postgres
|
|
|
|
# Roles
|
|
RUN \
|
|
--mount=type=bind,from=redxen.eu/data/ca:latest,src=/redxen.eu,dst=/ca \
|
|
/tmp/gen-cert.sh murmur
|
|
RUN \
|
|
--mount=type=bind,from=redxen.eu/data/ca:latest,src=/redxen.eu,dst=/ca \
|
|
/tmp/gen-cert.sh dovecot
|
|
RUN \
|
|
--mount=type=bind,from=redxen.eu/data/ca:latest,src=/redxen.eu,dst=/ca \
|
|
/tmp/gen-cert.sh postfix
|
|
RUN \
|
|
--mount=type=bind,from=redxen.eu/data/ca:latest,src=/redxen.eu,dst=/ca \
|
|
/tmp/gen-cert.sh grafana
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=generator "/redxen.eu" "/redxen.eu"
|