26 lines
593 B
Docker
26 lines
593 B
Docker
# syntax = docker/dockerfile:1.11-labs
|
|
|
|
FROM input AS typos
|
|
ARG rust_toolchain="nightly"
|
|
ARG RUSTUP_HOME
|
|
ARG CARGO_HOME
|
|
ARG typos_args=""
|
|
|
|
WORKDIR /
|
|
COPY --link --from=input . .
|
|
|
|
WORKDIR /usr/src/tuwunel
|
|
RUN \
|
|
--mount=type=cache,dst=${RUSTUP_HOME}/downloads,sharing=shared,ro \
|
|
--mount=type=cache,dst=${CARGO_HOME}/registry,sharing=shared,ro \
|
|
--mount=type=cache,dst=${CARGO_HOME}/git,sharing=shared,ro \
|
|
<<EOF
|
|
set -eux
|
|
rustup run ${rust_toolchain} \
|
|
typos \
|
|
--color always \
|
|
--exclude docker \
|
|
--exclude nix \
|
|
${typos_args}
|
|
EOF
|