From a83519b5bfd53a594840321571fc6bf97b542ba3 Mon Sep 17 00:00:00 2001 From: Vinayak Goyal Date: Fri, 12 Feb 2021 02:55:33 -0800 Subject: [PATCH] Use ARG instead of sed in the conformance image. --- cluster/images/conformance/Dockerfile | 4 +++- cluster/images/conformance/Makefile | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cluster/images/conformance/Dockerfile b/cluster/images/conformance/Dockerfile index 2466bbace45..f1f79d26519 100644 --- a/cluster/images/conformance/Dockerfile +++ b/cluster/images/conformance/Dockerfile @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM BASEIMAGE +ARG BASEIMAGE + +FROM ${BASEIMAGE} COPY ginkgo /usr/local/bin/ COPY e2e.test /usr/local/bin/ diff --git a/cluster/images/conformance/Makefile b/cluster/images/conformance/Makefile index 0c5f184975f..fa7e523db88 100644 --- a/cluster/images/conformance/Makefile +++ b/cluster/images/conformance/Makefile @@ -54,13 +54,12 @@ endif chmod a+rx ${TEMP_DIR}/e2e.test chmod a+rx ${TEMP_DIR}/gorunner - cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile - DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \ --platform linux/${ARCH} \ --load \ --pull \ -t ${REGISTRY}/conformance-${ARCH}:${VERSION} \ + --build-arg BASEIMAGE=$(BASEIMAGE) \ ${TEMP_DIR} rm -rf "${TEMP_DIR}"