Files
continuwuity/docker/Dockerfile.cargo.fmt
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
577 B
Docker
Raw Normal View History

2025-05-01 11:45:31 +00:00
# syntax = docker/dockerfile:1.11-labs
2025-05-02 00:46:59 +00:00
FROM input AS fmt
2025-05-01 11:45:31 +00:00
ARG rust_toolchain="nightly"
ARG RUSTUP_HOME
ARG CARGO_HOME
ARG fmt_args=""
WORKDIR /
COPY --link --from=input . .
2025-05-01 11:45:31 +00:00
WORKDIR /usr/src/tuwunel
RUN \
--mount=type=cache,dst=${RUSTUP_HOME}/downloads,sharing=shared \
--mount=type=cache,dst=${CARGO_HOME}/registry,sharing=shared \
--mount=type=cache,dst=${CARGO_HOME}/git,sharing=shared \
2025-05-01 11:45:31 +00:00
<<EOF
set -eux
rustup run ${rust_toolchain} \
cargo fmt \
--all \
--check \
--manifest-path Cargo.toml \
${fmt_args}
EOF