mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
fdb20fce81
Signed-off-by: d9pouces <github@19pouces.net>
25 lines
1.3 KiB
Docker
25 lines
1.3 KiB
Docker
FROM python:3.13-alpine AS target
|
|
FROM interdiode/id-configurator:latest AS configuration
|
|
COPY --from=target / /src/
|
|
COPY --from=generated-config Python.yaml /config.yaml
|
|
RUN id-configurator apply --config /config.yaml --src /src --dst /dst
|
|
FROM target AS runtime
|
|
ARG PYPI_REPO_PORT
|
|
# Warm up uv and poetry themselves from the real, network-reachable PyPI
|
|
# while the default index is still in place, so the actual tests below
|
|
# never need anything but the fixture repository configured by
|
|
# id-configurator. (easy_install/distutils, the fourth tool the `python`
|
|
# module configures, is not exercised here: both were removed from Python
|
|
# itself in 3.12, and setuptools no longer ships easy_install either, so
|
|
# there is no way to actually invoke it on a current interpreter.)
|
|
RUN pip install --no-cache-dir uv poetry
|
|
COPY --from=configuration /dst/ /
|
|
RUN pip install --no-cache-dir idconfiguratortestpkg \
|
|
&& python3 -c "import idconfiguratortestpkg"
|
|
RUN uv pip install --system idconfiguratortestpkg \
|
|
&& python3 -c "import idconfiguratortestpkg"
|
|
RUN mkdir -p /tmp/poetrytest && cd /tmp/poetrytest \
|
|
&& poetry init -n --name poetrytest \
|
|
&& poetry source add --priority explicit demo "https://host.docker.internal:${PYPI_REPO_PORT}/simple/" \
|
|
&& poetry add idconfiguratortestpkg --source demo
|