From 7f0e8c72953bf5f5169514296fd8d3ec90557d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 18 Dec 2022 16:18:31 +0200 Subject: [PATCH] chore: Make Debian dist a Docker build argument Makes it overridable from CLI, and just one place to update. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7db315d..47fe91a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ -FROM rust:bullseye as builder +ARG DEBIAN_DIST=bullseye + +FROM rust:${DEBIAN_DIST} as builder WORKDIR /usr/src/typos COPY . . 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 CMD ["typos"]