From 49e4d0f6928438c0386826936c60761d595e2e65 Mon Sep 17 00:00:00 2001 From: Chris Moos Date: Sat, 5 Mar 2022 16:32:49 -0700 Subject: [PATCH] Add support for building on ARM64 (and Apple Silicon). * Update Zulu version to multiarch (ARM supported one) * Remove dockerfile-maven-plugin building -- there is an upstream issue with building on ARM (FFI issue https://github.com/spotify/dockerfile-maven/issues/367) --- base/Dockerfile.ubi8 | 22 ++++++------ base/pom.xml | 84 +++++++++++++++++++++++++++++++++++--------- pom.xml | 6 ++-- 3 files changed, 81 insertions(+), 31 deletions(-) diff --git a/base/Dockerfile.ubi8 b/base/Dockerfile.ubi8 index 0827c9a091..3911e472f7 100644 --- a/base/Dockerfile.ubi8 +++ b/base/Dockerfile.ubi8 @@ -78,18 +78,18 @@ RUN microdnf --nodocs install yum \ && yum --nodocs -y install https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm \ && yum --nodocs install -y --setopt=install_weak_deps=False \ git \ - "openssl${OPENSSL_VERSION}" \ - "wget${WGET_VERSION}" \ - "nmap-ncat${NETCAT_VERSION}" \ - "python36${PYTHON36_VERSION}" \ - "tar${TAR_VERSION}" \ - "procps-ng${PROCPS_VERSION}" \ - "krb5-workstation${KRB5_WORKSTATION_VERSION}" \ - "iputils${IPUTILS_VERSION}" \ - "hostname${HOSTNAME_VERSION}" \ - "zulu11-ca-jdk-headless${ZULU_OPENJDK_VERSION}" "zulu11-ca-jre-headless${ZULU_OPENJDK_VERSION}" \ + "openssl-${OPENSSL_VERSION}" \ + "wget-${WGET_VERSION}" \ + "nmap-ncat-${NETCAT_VERSION}" \ + "python36-${PYTHON36_VERSION}" \ + "tar-${TAR_VERSION}" \ + "procps-ng-${PROCPS_VERSION}" \ + "krb5-workstation-${KRB5_WORKSTATION_VERSION}" \ + "iputils-${IPUTILS_VERSION}" \ + "hostname-${HOSTNAME_VERSION}" \ + "zulu11-ca-jdk-headless-${ZULU_OPENJDK_VERSION}" "zulu11-ca-jre-headless-${ZULU_OPENJDK_VERSION}" \ && alternatives --set python /usr/bin/python3 \ - && python3 -m pip install --upgrade "pip${PYTHON_PIP_VERSION}" "setuptools${PYTHON_SETUPTOOLS_VERSION}" \ + && python3 -m pip install --upgrade "pip==${PYTHON_PIP_VERSION}" "setuptools==${PYTHON_SETUPTOOLS_VERSION}" \ && python3 -m pip install --prefer-binary --prefix=/usr/local --upgrade "${PYTHON_CONFLUENT_DOCKER_UTILS_INSTALL_SPEC}" \ && yum remove -y git \ # Work around until Redhat releases updated base image diff --git a/base/pom.xml b/base/pom.xml index f49eb290af..a3ec2b0098 100644 --- a/base/pom.xml +++ b/base/pom.xml @@ -108,27 +108,77 @@ + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + docker-build + package + + exec + + + docker + ${project.basedir} + + build + -f + Dockerfile.ubi8 + --build-arg + UBI_MINIMAL_VERSION=${ubi.image.version} + --build-arg + OPENSSL_VERSION=${ubi.openssl.version} + --build-arg + WGET_VERSION=${ubi.wget.version} + --build-arg + NETCAT_VERSION=${ubi.netcat.version} + --build-arg + PYTHON36_VERSION=${ubi.python36.version} + --build-arg + TAR_VERSION=${ubi.tar.version} + --build-arg + PROCPS_VERSION=${ubi.procps.version} + --build-arg + KRB5_WORKSTATION_VERSION=${ubi.krb5.workstation.version} + --build-arg + IPUTILS_VERSION=${ubi.iputils.version} + --build-arg + HOSTNAME_VERSION=${ubi.hostname.version} + --build-arg + ZULU_OPENJDK_VERSION=${ubi.zulu.openjdk.version} + --build-arg + PYTHON_PIP_VERSION=${ubi.python.pip.version} + --build-arg + PYTHON_SETUPTOOLS_VERSION=${ubi.python.setuptools.version} + --build-arg + PYTHON_CONFLUENT_DOCKER_UTILS_VERSION=${ubi.python.confluent.docker.utils.version} + --build-arg + SKIP_SECURITY_UPDATE_CHECK=${docker.skip-security-update-check} + --build-arg + ARTIFACT_ID=${project.artifactId} + --build-arg + PROJECT_VERSION=${project.version} + -t + ${docker.registry}confluentinc/${project.artifactId}:${docker.tag} + . + + + + + com.spotify dockerfile-maven-plugin + + + package + none + + - - ${ubi.image.version} - -${ubi.openssl.version} - -${ubi.wget.version} - -${ubi.netcat.version} - -${ubi.python36.version} - -${ubi.tar.version} - -${ubi.procps.version} - -${ubi.krb5.workstation.version} - -${ubi.iputils.version} - -${ubi.hostname.version} - -${ubi.zulu.openjdk.version} - ==${ubi.python.pip.version} - ==${ubi.python.setuptools.version} - ${ubi.python.confluent.docker.utils.version} - ${docker.skip-security-update-check} - + true diff --git a/pom.xml b/pom.xml index 2dfa4f3203..919be8a0be 100644 --- a/pom.xml +++ b/pom.xml @@ -32,9 +32,9 @@ ${io.confluent.common-docker.version}-${docker.os_type} 7.0.1 - 8.5-204 + 8.5-230.1645809059 - 1.1.1k-4.el8 + 1.1.1k-5.el8_5 1.19.5-10.el8 7.70-6.el8 3.6.8-38.module+el8.5.0+12207+5c5719bc @@ -44,7 +44,7 @@ 20180629-7.el8 3.20-6.el8 - 11.0.13 + 11.0.14.1 21.* 54.*