[ 
https://issues.apache.org/jira/browse/ARTEMIS-4554?focusedWorklogId=898948&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-898948
 ]

ASF GitHub Bot logged work on ARTEMIS-4554:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jan/24 11:50
            Start Date: 10/Jan/24 11:50
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on code in PR #4731:
URL: https://github.com/apache/activemq-artemis/pull/4731#discussion_r1447282732


##########
artemis-docker/prepare-docker.sh:
##########
@@ -53,23 +53,23 @@ Well done! Now you can continue with building the Docker 
image:
   # Go to $ARTEMIS_DIST_DIR
   $ cd $ARTEMIS_DIST_DIR
 
-  # For CentOS with full JDK 11
-  $ docker build -f ./docker/Dockerfile-centos7-11 -t artemis-centos .
+  # For CentOS with full JDK 17
+  $ docker build -f ./docker/Dockerfile-centos7-17 -t artemis-centos .
 
-  # For Ubuntu with full JDK 11
-  $ docker build -f ./docker/Dockerfile-ubuntu-11 -t artemis-ubuntu .
+  # For Ubuntu with full JDK 21
+  $ docker build -f ./docker/Dockerfile-ubuntu-21 -t artemis-ubuntu .
 
-  # For Ubuntu with just JRE 11
-  $ docker build -f ./docker/Dockerfile-ubuntu-11-jre -t artemis-ubuntu-jre .
+  # For Ubuntu with just JRE 21
+  $ docker build -f ./docker/Dockerfile-ubuntu-21-jre -t artemis-ubuntu-jre .
 
-  # For Alpine with full JDK 17
-  $ docker build -f ./docker/Dockerfile-alpine-17 -t artemis-alpine .
+  # For Alpine with full JDK 21
+  $ docker build -f ./docker/Dockerfile-alpine-21 -t artemis-alpine .
 
-  # For Alpine with just JRE 11
-  $ docker build -f ./docker/Dockerfile-alpine-11-jre -t artemis-alpine-jre .
+  # For Alpine with just JRE 21
+  $ docker build -f ./docker/Dockerfile-alpine-21-jre -t artemis-alpine-jre .
 
-  # For Ubuntu on Linux ARMv7/ARM64 with full JDK
-  $ docker buildx build --platform linux/arm64,linux/arm/v7 --push -t 
{your-repository}/apache-artemis:2.17.0-SNAPSHOT -f 
./docker/Dockerfile-ubuntu-11 .
+  # Multi-platform for Ubuntu on Linux AMD64 & ARM64/V8 with full JDK
+  $ docker buildx build --platform linux/amd64,linux/arm64/v8 --push -t 
{your-repository}/apache-artemis:{your-version} -f 
./docker/Dockerfile-ubuntu-21 .

Review Comment:
   My understanding was they are essentially interchangeable, especially in 
this case with cross compiling against the bare 'linux/arm64' saying much the 
same thing as 'linux/arm/v8' because v8 was the original arm64. There could be 
more specific variants being produced in cases it might need to be explicitly 
distingish for a particular image, especially e.g if there are to be different 
supported variants of the image at the same time for different instruction 
classes and using a specific one is required in certain cases.
   
   For comparison, we also only tend to use 'linux/amd64' for images but there 
are also multiple variants of AMD64/x86-64 as well now to distinguish different 
instruction additions over time through feature levels, e.g the [docs I 
referenced for docker 
buildx](https://docs.docker.com/build/building/multi-platform/#cross-compilation)
 demonstrates those too such as linux/amd64/v2 and linux/amd64/v3. In the past, 
most stuff was built for just AMD64 'v1' but that increasingly isnt true 
anymore.
   
   As a related example to both of these, RHEL9 binaries are actually compiled 
for AMD64v2 feature level however the UBI9 images dont use linux/amd64/v2 for 
the os/arch name but [simply 
linux/amd64](https://hub.docker.com/layers/redhat/ubi9/latest/images/sha256-3b696988fc62a88631898d24bde1f2bfb703fe6530f36ad9b98baff9ad4c73fc?context=explore).
 The UBI9 image ARM bits are also published for simply linux/arm64 as another 
comparison.
   
   (Aside, its still being explored [whether RHEL10 will be compiled for 
AMD64/v3](https://developers.redhat.com/articles/2024/01/02/exploring-x86-64-v3-red-hat-enterprise-linux-10)...I
 would guess the images will just continue to use simply linux/amd64 for the 
os/arch name even if they are for/require v3).
   
   So e.g perhaps in future we could want/need to add linux/arm64/v9 in 
addition to linux/arm64 (or linux/arm64/v8) if we ever wanted to publish e.g v8 
and v9 aimed images with different content at the same time to support some 
specific native instruction usages (dont see that happening for a while, 
personally), but otherwise we would likely just have one version and folks 
would all still just get the 'linux/arm64' image.
   
   Actually, doing some more searching, this issue around the docker buildx 
stuff suggests that in some cases at least ['linux/arm64/v8' could just result 
in 'linux/arm64' output without specified variant since its not actually to 
expectation](https://github.com/moby/buildkit/issues/4039) and comments 
indicating instead it expects  just linux/arm64 or its said it could have been 
linux/arm/v8 if specifying v8 (i.e no 64 in that syntax). Though another 
comment there then also says 'linux/arm64' and 'linux/arm64/v8' are equal and 
neither is incorrect (in other contexts), which probably explains why the 
Temurin stuff is indeed using it just fine hehe.
   
   The original example here has long used linux/arm64 for the V8 bits, as do 
all the examples in docs for the docker build stuff by default, as do the UBI 
images. I think linux/arm64 is the nicer/neater/simpler option until we should 
actually need to do something more complex. I think I'd go with it as it was 
unless there is compelling obviously-correct reason we should change it now, 
which I'm not really seeing. 





Issue Time Tracking
-------------------

    Worklog Id:     (was: 898948)
    Time Spent: 1h 20m  (was: 1h 10m)

> Upgrade to latest Java for Docker images 
> -----------------------------------------
>
>                 Key: ARTEMIS-4554
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4554
>             Project: ActiveMQ Artemis
>          Issue Type: Task
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to