chore: Make Debian dist a Docker build argument

Makes it overridable from CLI, and just one place to update.
This commit is contained in:
Ville Skyttä 2022-12-18 16:18:31 +02:00
parent 5737842410
commit 7f0e8c7295

View file

@ -1,8 +1,10 @@
FROM rust:bullseye as builder ARG DEBIAN_DIST=bullseye
FROM rust:${DEBIAN_DIST} as builder
WORKDIR /usr/src/typos WORKDIR /usr/src/typos
COPY . . COPY . .
RUN cargo install --path . RUN cargo install --path .
FROM debian:bullseye-slim FROM debian:${DEBIAN_DIST}-slim
COPY --from=builder /usr/local/cargo/bin/typos /usr/local/bin/typos COPY --from=builder /usr/local/cargo/bin/typos /usr/local/bin/typos
CMD ["typos"] CMD ["typos"]