diff --git a/core/docker/Dockerfile b/core/docker/Dockerfile index 029afe4d4d45..d5ba547ec514 100644 --- a/core/docker/Dockerfile +++ b/core/docker/Dockerfile @@ -11,16 +11,16 @@ # See the License for the specific language governing permissions and # limitations under the License. # -ARG AZUL_DOCKER_TAG=17.0.4 -FROM azul/zulu-openjdk:$AZUL_DOCKER_TAG +FROM registry.access.redhat.com/ubi8/ubi ENV JAVA_HOME /usr/lib/jvm/zulu17 - RUN \ set -xeu && \ - apt-get update -q && \ - apt-get install -y -q less python curl && \ - rm -rf /var/lib/apt/lists/* && \ + yum -y -q install https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm && \ + yum -y -q install python3 zulu17-jdk less && \ + yum -q clean all && \ + rm -rf /var/cache/yum && \ + alternatives --set python /usr/bin/python3 && \ groupadd trino --gid 1000 && \ useradd trino --uid 1000 --gid 1000 && \ mkdir -p /usr/lib/trino /data/trino && \ diff --git a/core/docker/build.sh b/core/docker/build.sh index b267f4dbfd79..859fd3ebc80e 100755 --- a/core/docker/build.sh +++ b/core/docker/build.sh @@ -10,15 +10,13 @@ Builds the Trino Docker image -h Display help -a Build the specified comma-separated architectures, defaults to amd64,arm64 -r Build the specified Trino release version, downloads all required artifacts --j Azul JDK version as published in https://hub.docker.com/r/azul/zulu-openjdk EOF } ARCHITECTURES=(amd64 arm64) TRINO_VERSION= -AZUL_DOCKER_TAG="17.0.4" -while getopts ":a:h:r:j:" o; do +while getopts ":a:h:r:" o; do case "${o}" in a) IFS=, read -ra ARCHITECTURES <<< "$OPTARG" @@ -26,9 +24,6 @@ while getopts ":a:h:r:j:" o; do r) TRINO_VERSION=${OPTARG} ;; - j) - AZUL_DOCKER_TAG=${OPTARG} - ;; h) usage exit 0 @@ -75,15 +70,14 @@ cp -R default "${WORK_DIR}/" TAG_PREFIX="trino:${TRINO_VERSION}" for arch in "${ARCHITECTURES[@]}"; do - echo "๐Ÿซ™ Building the image for $arch using azul/zulu-openjdk:${AZUL_DOCKER_TAG} as a base" + echo "๐Ÿซ™ Building the image for $arch" docker build \ "${WORK_DIR}" \ --pull \ --platform "linux/$arch" \ -f Dockerfile \ -t "${TAG_PREFIX}-$arch" \ - --build-arg "TRINO_VERSION=${TRINO_VERSION}" \ - --build-arg "AZUL_DOCKER_TAG=${AZUL_DOCKER_TAG}" + --build-arg "TRINO_VERSION=${TRINO_VERSION}" done echo "๐Ÿงน Cleaning up the build context directory"