mirror of
https://github.com/NLnetLabs/routinator.git
synced 2024-05-19 06:50:04 +00:00
Dockerfile: Use an argument for selecting the build image.
This commit is contained in:
@ -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
|
# -- 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
|
RUN apk add rust cargo
|
||||||
|
|
||||||
@ -13,7 +16,7 @@ RUN cargo build \
|
|||||||
|
|
||||||
# -- stage 2: create alpine-based container with the static routinator
|
# -- stage 2: create alpine-based container with the static routinator
|
||||||
# executable
|
# 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/
|
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
|
# Build variables for uid and guid of user to run container
|
||||||
|
Reference in New Issue
Block a user