Closed tianon closed 7 years ago
Thanks @tianon for reaching out, I look forward to add multi-arch support to ibmjava . Will work on it later this week. Expecting to have lots of questions for you as well !
Going to also CC the websphere-liberty
image maintainers (@davidcurrie @jamiecoleman92 @dibbles) here so they can track the status of this, because once this is implemented, we're going to want to update that image too (which will hopefully be really minimal changes :muscle:)! :smile: :heart:
Catching up post-vacation. Thanks for the heads up @tianon. I suspect at your behest, @duglin has been making noises about moving IBM built images out of ppc64le and s390x. It would be good to get the websphere-liberty images there replaced by Docker built images before that clearout takes place.
Hi @tianon, here is a first cut of the multi-arch support for ibmjava, let me know if this works for you. Dockerfile and script changes are as below (alpine+ibmjava currently only works on amd64, please ignore the alpine Dockerfiles for other arches for now) https://github.com/ibmruntimes/ci.docker/pull/12 Updates to the library (I havent raised a PR yet) https://github.com/docker-library/official-images/compare/master...dinogun:ibmjava-multi-arch
Also as promised a few questions ! Thanks in advance !
Commented on #12 -- looks great!
Your library diff looks fine too; I'd note that it is valid to put GitCommit
up at the top if you'd like to deduplicate that (we usually only intersperse it because we generate the files so we like to put the exact latest commit of the Dockerfile
in each entry's section).
s390
isn't well-supported anywhere these days, is it? Looks like even Debian removed support for it back in Wheezy (when s390x
was added), and Go definitely doesn't officially support it.manifest-tool
directly, or use our bashbrew
tool which wraps it (via bashbrew put-shared ...
) -- you have to push each arch image somewhere, then combine them into a manifest list afterwardsdocker pull s390x/ibmjava
will continue to work, and will be built from the same sources as amd64/ibmjava
, etc (and will be what then gets combined into a manifest list to create /_/ibmjava
) :+1:Right, s390 is how it all started in 31-bit mode, almost 20 years ago. In some places it still stands for general platform support, and some old 31 bit applications are still running today on 64bit kernels. However, the current and only relevant mode of operation is s390x = 64 bit; no need to consider 31bit=s390.
I see it is working now for both s390x and ppc64le, yay !
$ docker run --rm -it ibmjava:8-sfj java -version
Unable to find image 'ibmjava:8-sfj' locally
8-sfj: Pulling from library/ibmjava
c58ca33e0c24: Already exists
fc3fd4e62755: Already exists
0c7fa8f00fe2: Already exists
1618266695ce: Already exists
7c037ccce0cb: Already exists
2c3f4a21f2a7: Already exists
9d2c11061bd0: Pull complete
Digest: sha256:bcf5667a2accda4e70b797b03de41c8b3d7b5494010df641d8159cc8b971e34f
Status: Downloaded newer image for ibmjava:8-sfj
java version "1.8.0"
Java(TM) SE Runtime Environment (build pxz6480sr4fp11-20170823_01(SR4 FP11) Small Footprint)
IBM J9 VM (build 2.8, JRE 1.8.0 Linux s390x-64 Compressed References 20170812_360168 (JIT enabled, AOT enabled)
J9VM - R28_20170812_0201_B360168
JIT - tr.r14.java_20170812_360168
GC - R28_20170812_0201_B360168_CMPRSS
J9CL - 20170812_360168)
JCL - 20170726_01 based on Oracle jdk8u144-b01
$ docker run --rm -it ibmjava:8-jre java -version
Unable to find image 'ibmjava:8-jre' locally
8-jre: Pulling from library/ibmjava
0ad9ca03f1b2: Pull complete
7d2491df9494: Pull complete
9a961cbb08c0: Pull complete
9f38c9e24bdd: Pull complete
36070ab6f935: Pull complete
e44e9115c675: Pull complete
a19364f87895: Pull complete
Digest: sha256:5a63b4657da717067c9f11f7adebc606eacb6449d32ec81ec48265896cfbeb26
Status: Downloaded newer image for ibmjava:8-jre
java version "1.8.0"
Java(TM) SE Runtime Environment (build pxl6480sr4fp11-20170823_01(SR4 FP11))
IBM J9 VM (build 2.8, JRE 1.8.0 Linux ppc64le-64 Compressed References 20170812_360168 (JIT enabled, AOT enabled)
J9VM - R28_20170812_0201_B360168
JIT - tr.r14.java_20170812_360168
GC - R28_20170812_0201_B360168_CMPRSS
J9CL - 20170812_360168)
JCL - 20170726_01 based on Oracle jdk8u144-b01
The Official Images finally have official multi-architecture support (see https://github.com/docker-library/official-images#architectures-other-than-amd64 and https://github.com/docker-library/official-images#multiple-architectures for details). It looks like the hard work to support this for
ibmjava
has already been done (figuring out where the upstream multi-arch bits live), and all that's really left is to combine all that into a singleDockerfile
that transparently handles multi-arch and then to addArchitectures
entries tolibrary/ibmjava
. :+1:I didn't want to send a PR to re-organize this whole repo to remove the intermediate architecture-specific folders without discussing it in an issue first. :heart:
So, for a
Dockerfile
like https://github.com/ibmruntimes/ci.docker/blob/9b62a599bd4bcdba1983c71880dff055ef5a488b/ibmjava/8/jre/x86_64/ubuntu/Dockerfile, here's how I'd propose that changes:See
golang
for another good example of this pattern (https://github.com/docker-library/golang/blob/f34c645c8402bd8f6b70f530545ad7845dfefbcc/1.9/stretch/Dockerfile#L16-L27).I'm more than happy to make a PR to implement this (where we can discuss details of the actual implementation further, and iterate on it until you're happy with it), but again, it's a big change, so I figured it's probably worth discussing before I do a huge PR dump. :smile:
The primary benefit of doing this is that once https://github.com/docker-library/official-images/issues/2289 is resolved (which should hopefully be soon!), users of this image will be able to just use
ibmjava
on every architecture and it'll do-the-right-thing appropriately out-of-the-box. :+1:If you want more examples of multi-architecture official images, see any of the following: