From 3dd0262773b60a611434bad03692d5b2ab01d17b Mon Sep 17 00:00:00 2001 From: James Nesbitt Date: Mon, 30 Mar 2020 10:27:59 -0400 Subject: [PATCH] build Dockerfile allows arg for base build FROM Issue: https://github.com/moby/moby/issues/35729 - Dockerfile now has an ARG for fully specifying GOLANG base image used for build - Base image defaults to current patter * This allows testing of alternate GOLANG environments * Required downstream (EE) for things like FIPS testing Signed-off-by: James Nesbitt --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1536e234f1..031fdb727b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,9 @@ ARG GO_VERSION=1.13.8 ARG DEBIAN_FRONTEND=noninteractive ARG VPNKIT_VERSION=0.4.0 ARG DOCKER_BUILDTAGS="apparmor seccomp selinux" +ARG GOLANG_IMAGE="golang:${GO_VERSION}-buster" -FROM golang:${GO_VERSION}-buster AS base +FROM ${GOLANG_IMAGE} AS base RUN echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache ARG APT_MIRROR RUN sed -ri "s/(httpredir|deb).debian.org/${APT_MIRROR:-deb.debian.org}/g" /etc/apt/sources.list \