conan-1.6-utilities/Containerfile
Ole-Morten Duesund a11e9fb34e Add conandeps: dependency, binary-availability and override report for Conan 1.66
conandeps.py lists direct and indirect dependencies of a conanfile.py,
checks whether Release/Debug/RelWithDebInfo binaries exist on a remote for
the exact profile, and reports explicit (override=True) and implicit
requirement overrides both as a list and on the edges of the dependency
tree. Text output by default, optional self-contained HTML via --html.

The graph is built once per build type through Conan's own info API and
each node's binary status is read back, so package_id modes and options
are honoured like a real install. Overrides are parsed from Conan's WARN
output since 1.x does not record them on the graph.

Development runs inside a pinned podman container (Containerfile, dev.sh)
with Conan 1.66 on Python 3.11. Tests start a throw-away conan_server and
verify missing-binary and override detection end to end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 14:48:28 +02:00

19 lines
795 B
Docker

# Development / runtime container for the conan utilities.
# Pinned to Conan 1.66 (the version we target) on Python 3.11 — Conan 1.x
# still imports distutils, which was removed in Python 3.12.
FROM docker.io/library/python:3.11-slim-bookworm
ARG BUILD_DATE
ARG GIT_REVISION
LABEL org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${GIT_REVISION}"
RUN printf 'build_date=%s\ngit_revision=%s\n' "${BUILD_DATE}" "${GIT_REVISION}" > /etc/build-info
RUN pip install --no-cache-dir --root-user-action=ignore \
"conan==1.66.0" pytest ruff shellcheck-py
# Non-root user so files created in the mounted workdir are owned by the caller.
RUN useradd -m -u 1000 dev
USER dev
WORKDIR /work
ENV CONAN_USER_HOME=/home/dev PATH=/home/dev/.local/bin:$PATH