mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: refactor Dockerfiles to use 'target' stage and add Certificate module configuration
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
FROM alpine:3.20 AS detection
|
||||
FROM alpine:3.20 AS target
|
||||
FROM interdiode/id-configurator:latest AS configuration
|
||||
COPY --from=detection / /src/
|
||||
COPY --from=target / /src/
|
||||
COPY --from=generated-config Apk.yaml /config.yaml
|
||||
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
||||
FROM alpine:3.20 AS runtime
|
||||
FROM target AS runtime
|
||||
COPY --from=configuration /dst/ /
|
||||
RUN apk update \
|
||||
&& apk add idconfiguratortestpkg \
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM debian:trixie-slim AS detection
|
||||
FROM debian:trixie-slim AS target
|
||||
FROM interdiode/id-configurator:latest AS configuration
|
||||
COPY --from=detection / /src/
|
||||
COPY --from=target / /src/
|
||||
COPY --from=generated-config Apt.yaml /config.yaml
|
||||
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
||||
FROM debian:trixie-slim AS runtime
|
||||
FROM target AS runtime
|
||||
COPY --from=configuration /dst/ /
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends idconfiguratortestpkg \
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
FROM debian:trixie-slim AS target
|
||||
FROM interdiode/id-configurator:latest AS configuration
|
||||
COPY --from=target / /src/
|
||||
COPY --from=generated-config Certificate.yaml /config.yaml
|
||||
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
||||
FROM target AS runtime
|
||||
ARG CERTIFICATE_REPO_PORT
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends wget curl
|
||||
COPY --from=configuration /dst/ /
|
||||
RUN wget -qO- "https://host.docker.internal:${CERTIFICATE_REPO_PORT}/marker.txt" | grep -qx trusted-via-root-ca
|
||||
RUN curl -fsS "https://host.docker.internal:${CERTIFICATE_REPO_PORT}/marker.txt" | grep -qx trusted-via-root-ca
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM maven:3.9-eclipse-temurin-21 AS detection
|
||||
FROM maven:3.9-eclipse-temurin-21 AS target
|
||||
FROM interdiode/id-configurator:latest AS configuration
|
||||
COPY --from=detection / /src/
|
||||
COPY --from=target / /src/
|
||||
COPY --from=generated-config Java.yaml /config.yaml
|
||||
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
||||
FROM maven:3.9-eclipse-temurin-21 AS runtime
|
||||
FROM target AS runtime
|
||||
# Warm up the local repository with the maven-dependency-plugin itself (from
|
||||
# the real, network-reachable Maven Central) while the default mirror is
|
||||
# still in place, so the actual test below never needs anything but the
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM python:3.13-slim AS detection
|
||||
FROM python:3.13-slim AS target
|
||||
FROM interdiode/id-configurator:latest AS configuration
|
||||
COPY --from=detection / /src/
|
||||
COPY --from=target / /src/
|
||||
COPY --from=generated-config Python.yaml /config.yaml
|
||||
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
||||
FROM python:3.13-slim AS runtime
|
||||
FROM target AS runtime
|
||||
COPY --from=configuration /dst/ /
|
||||
RUN pip install --no-cache-dir idconfiguratortestpkg \
|
||||
&& python3 -c "import idconfiguratortestpkg"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM rockylinux:9 AS detection
|
||||
FROM rockylinux:9 AS target
|
||||
FROM interdiode/id-configurator:latest AS configuration
|
||||
COPY --from=detection / /src/
|
||||
COPY --from=target / /src/
|
||||
COPY --from=generated-config Yum.yaml /config.yaml
|
||||
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
||||
FROM rockylinux:9 AS runtime
|
||||
FROM target AS runtime
|
||||
COPY --from=configuration /dst/ /
|
||||
RUN dnf install -y idconfiguratortestpkg \
|
||||
&& rpm -q idconfiguratortestpkg
|
||||
|
||||
Reference in New Issue
Block a user