From bee5a5fa17c25b427f5d5650f00b21e9be53eaf4 Mon Sep 17 00:00:00 2001 From: Martin Hoffmann Date: Thu, 27 May 2021 16:12:59 +0200 Subject: [PATCH] Dockerfile: Use an argument for selecting the build image. --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e06dbff..33550e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ +# -- stage 0: some configuration +ARG BASE_IMG=alpine:3.13.5 + # -- stage 1: build static routinator with musl libc for alpine -FROM alpine:3.13.5 as build +FROM ${BASE_IMG} as build RUN apk add rust cargo @@ -13,7 +16,7 @@ RUN cargo build \ # -- stage 2: create alpine-based container with the static routinator # executable -FROM alpine:3.13.5 +FROM ${BASE_IMG} COPY --from=build /tmp/routinator/target/x86_64-alpine-linux-musl/release/routinator /usr/local/bin/ # Build variables for uid and guid of user to run container