mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
438fed1e96
Signed-off-by: d9pouces <github@19pouces.net>
33 lines
1.4 KiB
Docker
33 lines
1.4 KiB
Docker
# Minimal HTTPS server, using the same Test CA as the other *-repo fixtures,
|
|
# used by tox-docker to exercise the `certificates` module integration test
|
|
# (tests/configs/Certificate.yaml.j2, tests/dockerfiles/Certificate.Dockerfile).
|
|
# Unlike the package-manager fixtures, this one has nothing to do with a
|
|
# specific package format: it serves a static marker file (for wget, curl and
|
|
# openssl s_client) and a bare git repository over the "dumb" HTTP protocol
|
|
# (for `git clone`).
|
|
#
|
|
# Built by tox-docker, whose build context is this directory (not the repo
|
|
# root) - every COPY source below must live under tests/dockerfiles/repos/.
|
|
FROM alpine:3.20 AS gitbuild
|
|
RUN apk add --no-cache git
|
|
RUN git config --global init.defaultBranch main \
|
|
&& git config --global user.email test@example.invalid \
|
|
&& git config --global user.name "id-configurator tests"
|
|
RUN mkdir -p /work \
|
|
&& cd /work \
|
|
&& git init -q \
|
|
&& echo "trusted-via-root-ca" > marker.txt \
|
|
&& git add marker.txt \
|
|
&& git commit -q -m "initial commit"
|
|
RUN git clone --bare -q /work /srv/repo.git \
|
|
&& cd /srv/repo.git \
|
|
&& git update-server-info
|
|
|
|
FROM nginx:alpine
|
|
RUN mkdir -p /srv && echo "trusted-via-root-ca" > /srv/marker.txt
|
|
COPY --from=gitbuild /srv/repo.git /srv/repo.git
|
|
COPY repo-server.crt.pem /etc/nginx/certs/repo-server.crt.pem
|
|
COPY repo-server.key.pem /etc/nginx/certs/repo-server.key.pem
|
|
COPY certificate-repo.nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 8443
|