# The Linux target's integration test: Debian with real systemd as PID 1 and the test-only # `deploy` example. Built from the repository root (tests/linux/run.sh); the sources go in through the # build context, so no host folder is mounted. FROM docker.io/library/rust:1-slim-trixie AS build WORKDIR /src COPY Cargo.toml Cargo.lock ./ COPY crates crates RUN cargo build --locked --example deploy -p legatus-linux \ && cp target/debug/examples/deploy /legatus-deploy-test FROM docker.io/library/debian:trixie-slim RUN apt-get update \ && apt-get install -y --no-install-recommends systemd systemd-sysv python3 curl ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && systemctl mask systemd-logind.service getty.target console-getty.service COPY --from=build /legatus-deploy-test /usr/local/bin/legatus-deploy-test COPY tests/linux/scenario.sh /scenario.sh STOPSIGNAL SIGRTMIN+3 CMD ["/sbin/init"]