FROM rust:1-slim AS target FROM interdiode/id-configurator:latest AS configuration COPY --from=target / /src/ COPY --from=generated-config Rust.yaml /config.yaml RUN id-configurator apply --config /config.yaml --src /src --dst /dst FROM target AS runtime COPY --from=configuration /dst/ / # Deliberately not touching CARGO_HOME (the official image sets it to # /usr/local/cargo): id-configurator writes /.cargo/config.toml, which # cargo's config search always consults regardless of CARGO_HOME, precisely # so this doesn't need to line up with wherever CARGO_HOME happens to point. RUN cargo new /tmp/rusttest -q && cd /tmp/rusttest \ && cargo add idconfiguratortestpkg \ && cargo fetch \ && grep -qx '// test-only crate served by the id-configurator integration tests' \ "$(find "$CARGO_HOME/registry/src" -name lib.rs)"