From bb3c3c5b5232daa4660a5e28e53b808bcb656805 Mon Sep 17 00:00:00 2001 From: Benjamin Gandon Date: Fri, 10 May 2024 18:40:35 +0200 Subject: [PATCH] Fix base image pinning from Concourse resources Properly using build args as advised in the docs. --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d99a234..94d054ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ -FROM golang AS builder +ARG golang +ARG alpine + +FROM ${golang} AS builder ADD . /go/src/github.com/telia-oss/github-pr-resource WORKDIR /go/src/github.com/telia-oss/github-pr-resource RUN curl -sL https://taskfile.dev/install.sh | sh /dev/stdin v3.33.1 RUN ./bin/task build -FROM alpine AS resource +FROM ${alpine} AS resource COPY --from=builder /go/src/github.com/telia-oss/github-pr-resource/build /opt/resource RUN apk add --update --no-cache \ git \