mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: add Python-alpine Dockerfile for enhanced build process and testing with id-configurator
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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)"
|
||||
Reference in New Issue
Block a user