From e9fbdff7c6b4404f32bb168981a3adb3c655edfd Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Fri, 29 Jan 2021 11:36:52 +0100 Subject: [PATCH] Switch to `docker buildx` for conformance image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The conformance test image previously used the `FROM --platform …` syntax which is something we (SIG Release) consider as deprecated. Therefore we now switch to `docker buildx`, which can specify the `--platform` directly. Signed-off-by: Sascha Grunert --- cluster/images/conformance/Dockerfile | 2 +- cluster/images/conformance/Makefile | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cluster/images/conformance/Dockerfile b/cluster/images/conformance/Dockerfile index 0fc607f994b..2466bbace45 100644 --- a/cluster/images/conformance/Dockerfile +++ b/cluster/images/conformance/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM --platform=linux/ARCH 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 c2284d1fb12..35ae5147889 100644 --- a/cluster/images/conformance/Makefile +++ b/cluster/images/conformance/Makefile @@ -54,9 +54,14 @@ endif chmod a+rx ${TEMP_DIR}/e2e.test chmod a+rx ${TEMP_DIR}/gorunner - cd ${TEMP_DIR} && sed -i.back "s|ARCH|${ARCH}|g; s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile + cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile - docker build --pull -t ${REGISTRY}/conformance-${ARCH}:${VERSION} ${TEMP_DIR} + docker buildx build \ + --platform linux/${ARCH} \ + --load \ + --pull \ + -t ${REGISTRY}/conformance-${ARCH}:${VERSION} \ + ${TEMP_DIR} rm -rf "${TEMP_DIR}" push: build