mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
6b6bc541dd
Signed-off-by: d9pouces <github@19pouces.net>
17 lines
842 B
Docker
17 lines
842 B
Docker
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)"
|