You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2024/01/11 17:50:07 UTC

(activemq-artemis) branch main updated: ARTEMIS-4556 support release of multi-platform Docker images

This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new e3c6531bfd ARTEMIS-4556 support release of multi-platform Docker images
e3c6531bfd is described below

commit e3c6531bfdcdda5e96404c0a80e621440d73819f
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Sat Jan 6 17:29:17 2024 -0600

    ARTEMIS-4556 support release of multi-platform Docker images
---
 RELEASING.md                     |  8 ++++----
 artemis-docker/prepare-docker.sh |  4 ++--
 scripts/release-docker.sh        | 14 ++++----------
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/RELEASING.md b/RELEASING.md
index 9514269875..327f56f1da 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -364,15 +364,15 @@ NOTE: The `main` branch CI build does not build Artemis, so the release must be
 
 1. If you don't have an account on https://hub.docker.com/ then create one.
 2. [Install `docker`](https://docs.docker.com/engine/install/) in your environment.
-3. Ensure you have access to push images to `apache/activemq-artemis`. If you don't have access you can request it by
-   creating an INFRA Jira ticket (e.g. https://issues.apache.org/jira/browse/INFRA-24831).
-4. Go to the `scripts` directory and run `release-docker.sh` with the proper parameters, e.g.:
+3. If you don't already have it, then install the [`buildx` Docker plugin](https://github.com/docker/buildx#installing) to support multi-platform builds because `release-docker.sh` will create images for both `linux/amd64` and `linux/arm64`. This, of course, requires the base images from Eclipse Temurin to support these platforms as well (which they do).
+4. Ensure you have access to push images to `apache/activemq-artemis`. If you don't have access you can request it by creating an INFRA Jira ticket (e.g. https://issues.apache.org/jira/browse/INFRA-24831).
+5. Go to the `scripts` directory and run `release-docker.sh` with the proper parameters, e.g.:
    ```shell
    $ ./release-docker.sh 2.31.0 apache
    ```
    You can easily perform a test run by using your personal account, e.g.:
    ```shell
-   $ ./release-docker.sh 2.31.0 jbertram
+   $ ./release-docker.sh 2.31.0 myUsername
    ```
 
 ## Send announcement to user list
diff --git a/artemis-docker/prepare-docker.sh b/artemis-docker/prepare-docker.sh
index 31e7eeba49..2b3eaf01e0 100755
--- a/artemis-docker/prepare-docker.sh
+++ b/artemis-docker/prepare-docker.sh
@@ -108,9 +108,9 @@ key="$1"
   shift
 done
 
-# TMPDIR must be contained within the working directory so it is part of the
+# BASE_TMPDIR must be contained within the working directory so it is part of the
 # Docker context. (i.e. it can't be in /tmp)
-BASE_TMPDIR="_TMP_/artemis"
+BASE_TMPDIR="target/artemis"
 
 if [ -n "${FROM_RELEASE}" ] && [ -z "${ARTEMIS_VERSION}" ]; then
   usage "You must specify the release version (e.g. --artemis-version 2.16.0)"
diff --git a/scripts/release-docker.sh b/scripts/release-docker.sh
index 4352bab967..4a79c39b6d 100755
--- a/scripts/release-docker.sh
+++ b/scripts/release-docker.sh
@@ -28,17 +28,11 @@ VERSION=$1
 REPO=$2
 
 cd ../artemis-docker
-rm -Rf _TMP_/
+rm -Rf target/
 ./prepare-docker.sh --from-release --artemis-version ${VERSION}
-cd _TMP_/artemis/${VERSION}
+cd target/artemis/${VERSION}
 docker pull eclipse-temurin:21-jre-alpine
 docker pull eclipse-temurin:21-jre
-docker build -f ./docker/Dockerfile-alpine-21-jre -t ${REPO}/activemq-artemis:${VERSION}-alpine .
-docker tag ${REPO}/activemq-artemis:${VERSION}-alpine ${REPO}/activemq-artemis:latest-alpine
-docker build -f ./docker/Dockerfile-ubuntu-21-jre -t ${REPO}/activemq-artemis:${VERSION} .
-docker tag ${REPO}/activemq-artemis:${VERSION} ${REPO}/activemq-artemis:latest
 docker login
-docker push ${REPO}/activemq-artemis:${VERSION}-alpine
-docker push ${REPO}/activemq-artemis:${VERSION}
-docker push ${REPO}/activemq-artemis:latest-alpine
-docker push ${REPO}/activemq-artemis:latest
\ No newline at end of file
+docker buildx build --platform linux/amd64,linux/arm64 -f ./docker/Dockerfile-alpine-21-jre -t ${REPO}/activemq-artemis:${VERSION}-alpine -t ${REPO}/activemq-artemis:latest-alpine --push .
+docker buildx build --platform linux/amd64,linux/arm64 -f ./docker/Dockerfile-ubuntu-21-jre -t ${REPO}/activemq-artemis:${VERSION} -t ${REPO}/activemq-artemis:latest --push .
\ No newline at end of file