From 6e61c8263adf4c705666184209b0aa5bc9db4c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JB=20Onofr=C3=A9?= Date: Wed, 11 Mar 2026 16:00:41 +0100 Subject: [PATCH 1/4] feat(assembly): add Docker image build support via Maven profile (#1701) --- assembly/pom.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/assembly/pom.xml b/assembly/pom.xml index e4a9922b4dc..1c0cb476787 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -703,5 +703,52 @@ + + docker + + + + io.fabric8 + docker-maven-plugin + 0.45.1 + + + + apache/activemq:${project.version} + + ${project.basedir}/src/docker/Dockerfile + ${project.basedir}/src/docker + + _TMP_/apache-activemq.tar.gz + + + _TMP_ + + + + ${project.build.directory}/apache-activemq-${project.version}-bin.tar.gz + apache-activemq.tar.gz + . + + + + + + + + + + + docker-build + package + + build + + + + + + + From bda7109e3a5ab86d62e8c1bf75dcd23ddd007be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JB=20Onofr=C3=A9?= Date: Wed, 11 Mar 2026 16:12:38 +0100 Subject: [PATCH 2/4] feat(assembly): add multi platforms support (#1701) --- assembly/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assembly/pom.xml b/assembly/pom.xml index 1c0cb476787..280ffa8ae47 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -718,6 +718,12 @@ ${project.basedir}/src/docker/Dockerfile ${project.basedir}/src/docker + + + linux/amd64 + linux/arm64 + + _TMP_/apache-activemq.tar.gz From 2c3713125796e5f6967fb1c12ed3138a5a70b8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JB=20Onofr=C3=A9?= Date: Wed, 11 Mar 2026 16:23:21 +0100 Subject: [PATCH 3/4] feat(assembly): add two Maven profiles for Docker: one to build "locally", another to publish on DockerHub with multi-platforms (#1701) --- assembly/pom.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/assembly/pom.xml b/assembly/pom.xml index 280ffa8ae47..122b0dbf36e 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -705,6 +705,53 @@ docker + + + + io.fabric8 + docker-maven-plugin + 0.45.1 + + + + apache/activemq:${project.version} + + ${project.basedir}/src/docker/Dockerfile + ${project.basedir}/src/docker + + _TMP_/apache-activemq.tar.gz + + + _TMP_ + + + + ${project.build.directory}/apache-activemq-${project.version}-bin.tar.gz + apache-activemq.tar.gz + . + + + + + + + + + + + docker-build + package + + build + + + + + + + + + docker-deploy @@ -745,7 +792,7 @@ - docker-build + docker-deploy package build From 819c1f42aa4e5870a4e1fe8e87f25ab114f48a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JB=20Onofr=C3=A9?= Date: Fri, 13 Mar 2026 09:31:00 +0100 Subject: [PATCH 4/4] refactor(assembly): externalize Docker build configuration into Maven properties Move docker-maven-plugin version and Java version to parent pom properties, parameterize the Dockerfile base image JDK version, and remove the unused build.sh script now superseded by Maven profiles. (#1701) --- assembly/pom.xml | 6 +- assembly/src/docker/Dockerfile | 3 +- assembly/src/docker/build.sh | 133 --------------------------------- pom.xml | 2 + 4 files changed, 8 insertions(+), 136 deletions(-) delete mode 100755 assembly/src/docker/build.sh diff --git a/assembly/pom.xml b/assembly/pom.xml index 122b0dbf36e..e4923b33e2a 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -710,7 +710,7 @@ io.fabric8 docker-maven-plugin - 0.45.1 + ${docker-maven-plugin-version} @@ -719,6 +719,7 @@ ${project.basedir}/src/docker/Dockerfile ${project.basedir}/src/docker + ${docker-java-version} _TMP_/apache-activemq.tar.gz @@ -757,7 +758,7 @@ io.fabric8 docker-maven-plugin - 0.45.1 + ${docker-maven-plugin-version} @@ -772,6 +773,7 @@ + ${docker-java-version} _TMP_/apache-activemq.tar.gz diff --git a/assembly/src/docker/Dockerfile b/assembly/src/docker/Dockerfile index c6b917a443c..26d12066995 100644 --- a/assembly/src/docker/Dockerfile +++ b/assembly/src/docker/Dockerfile @@ -16,7 +16,8 @@ # limitations under the License. ################################################################################ -FROM eclipse-temurin:17-jre +ARG java_version=17 +FROM eclipse-temurin:${java_version}-jre # ActiveMQ environment variables ENV ACTIVEMQ_INSTALL_PATH /opt diff --git a/assembly/src/docker/build.sh b/assembly/src/docker/build.sh deleted file mode 100755 index a16dc0e7397..00000000000 --- a/assembly/src/docker/build.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh - -################################################################################ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -################################################################################ - -usage() { - cat <] [--image-name ] [--build-multi-platform ] - build.sh --from-release --activemq-version [--image-name ] [--build-multi-platform ] - build.sh --help - - If the --image-name flag is not used the built image name will be 'activemq'. - Check the supported build platforms; you can verify with this command: docker buildx ls - The supported platforms (OS/Arch) depend on the build's base image, in this case [eclipse-temurin:17-jre](https://hub.docker.com/_/eclipse-temurin). - -HERE - exit 1 -} - -while [ $# -ge 1 ] -do -key="$1" - case $key in - --from-local-dist) - FROM_LOCAL="true" - ;; - --from-release) - FROM_RELEASE="true" - ;; - --image-name) - IMAGE_NAME="$2" - shift - ;; - --archive) - ARCHIVE="$2" - shift - ;; - --activemq-version) - ACTIVEMQ_VERSION="$2" - shift - ;; - --build-multi-platform) - BUILD_MULTI_PLATFORM="$2" - shift - ;; - --help) - usage - ;; - *) - # unknown option - ;; - esac - shift -done - -IMAGE_NAME=${IMAGE_NAME:-activemq} - -# TMPDIR must be contained within the working directory so it is part of the -# Docker context. (i.e. it can't be mktemp'd in /tmp) -TMPDIR=_TMP_ - -cleanup() { - rm -rf "${TMPDIR}" -} -trap cleanup EXIT - -mkdir -p "${TMPDIR}" - -if [ -n "${FROM_RELEASE}" ]; then - - [ -n "${ACTIVEMQ_VERSION}" ] || usage - - ACTIVEMQ_BASE_URL="https://dlcdn.apache.org/activemq/${ACTIVEMQ_VERSION}/" - ACTIVEMQ_DIST_FILE_NAME="apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz" - CURL_OUTPUT="${TMPDIR}/${ACTIVEMQ_DIST_FILE_NAME}" - - echo "Downloading ${ACTIVEMQ_DIST_FILE_NAME} from ${ACTIVEMQ_BASE_URL}" - curl -s "${ACTIVEMQ_BASE_URL}${ACTIVEMQ_DIST_FILE_NAME}" --output "${CURL_OUTPUT}" - - ACTIVEMQ_DIST="${CURL_OUTPUT}" - -elif [ -n "${FROM_LOCAL}" ]; then - - if [ -n "${ARCHIVE}" ]; then - DIST_DIR=${ARCHIVE} - else - DIST_DIR="target/apache-activemq-*.tar.gz" - fi - ACTIVEMQ_DIST=${TMPDIR}/apache-activemq.tar.gz - echo "Using ActiveMQ dist: ${DIST_DIR}" - cp ${DIST_DIR} ${ACTIVEMQ_DIST} - -else - - usage - -fi - -if [ -n "${BUILD_MULTI_PLATFORM}" ]; then - echo "Checking if buildx installed..." - VERSION_BUILD_X=$(docker buildx version) > /dev/null 2>&1 - - if [ $? -eq 0 ]; then - echo "Found buildx {${VERSION_BUILD_X}} on your docker system" - echo "Starting build of the docker image for the platform ${BUILD_MULTI_PLATFORM}" - - BUILD_X="buildx" - BUILD_X_FLAG="--push" - BUILD_X_PLATFORM="--platform ${BUILD_MULTI_PLATFORM}" - else - echo "Error: buildx not installed with your docker system" - exit 2 - fi - -fi - -docker ${BUILD_X} build ${BUILD_X_PLATFORM} --build-arg activemq_dist="${ACTIVEMQ_DIST}" ${BUILD_X_FLAG} -t "${IMAGE_NAME}" . diff --git a/pom.xml b/pom.xml index 61751cb668e..a21d37d1af9 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,8 @@ 5.5.0.6356 1.4 1.5.0 + 0.45.1 + 17 3.9.0 1.45 3.9.12