# Minimal flat-format APT repository serving one hand-built .deb package over # TLS, used by tox-docker to exercise the `apt` module integration test # (tests/configs/Apt.yaml.tmpl, tests/dockerfiles/Apt.Dockerfile). # # 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 debian:trixie-slim AS packagebuild RUN apt-get update \ && apt-get install -y --no-install-recommends dpkg-dev \ && rm -rf /var/lib/apt/lists/* RUN set -eux; \ pkg=idconfiguratortestpkg; \ root=/build/$pkg; \ mkdir -p "$root/DEBIAN" "$root/usr/share/doc/$pkg"; \ printf 'test-only package served by the id-configurator integration tests\n' > "$root/usr/share/doc/$pkg/marker"; \ printf 'Package: %s\nVersion: 0.0.1\nArchitecture: all\nMaintainer: InterDiode \nDescription: Test-only package served by the id-configurator integration tests\n' "$pkg" > "$root/DEBIAN/control"; \ dpkg-deb --root-owner-group --build "$root" "/srv/${pkg}_0.0.1_all.deb" WORKDIR /srv RUN dpkg-scanpackages --multiversion . > Packages \ && gzip -9c Packages > Packages.gz FROM nginx:alpine COPY --from=packagebuild /srv /srv 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 apt-repo.nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 8443