Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proposal] support for pulling images of arm64 and other arches from openjdk repository #364

Closed
runzexia opened this issue Oct 10, 2019 · 6 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@runzexia
Copy link

Currently I can use docker buildx to build the image (using the same dockerfile).
But when the base image of the project is openjdk, I can't complete this step. I need to create another dockerfile.
like https://github.com/kubesphere/docker-sonarqube/blob/kubesphere/7.4-community/Dockerfile-arm

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Oct 10, 2019
@wglambert
Copy link

docker-library/golang#304 (comment)

$ docker version | grep OS
 OS/Arch:           linux/amd64
  OS/Arch:          linux/amd64

$ docker pull arm64v8/openjdk:8-jdk
8-jdk: Pulling from arm64v8/openjdk
no matching manifest for linux/amd64 in the manifest list entries

$ docker pull arm64v8/openjdk:8-jdk-slim
8-jdk-slim: Pulling from arm64v8/openjdk
29b80961214d: Pull complete 
392e0924564e: Pull complete 
d15c6e01e710: Pull complete 
acba4335cd44: Pull complete 
b1f6a0f413ed: Pull complete 
Digest: sha256:728f475f19f5cfe7882c01aee76cd2f60f86be24de19bb7846e537413aefba8c
Status: Downloaded newer image for arm64v8/openjdk:8-jdk-slim
docker.io/arm64v8/openjdk:8-jdk-slim

$ docker pull arm64v8/openjdk:8-jdk-stretch
8-jdk-stretch: Pulling from arm64v8/openjdk
5894e2829197: Pull complete 
7a8e6888cee6: Pull complete 
8bf90e854779: Pull complete 
a4c8eeecda69: Pull complete 
84d24874c96b: Pull complete 
c0b183b74b0d: Pull complete 
46da99b9149b: Pull complete 
e5974158891e: Pull complete 
Digest: sha256:1fbd49e3fc5e53154fa93cad15f211112d899a6b0c5dc1e8661d6eb6c18b30a6
Status: Downloaded newer image for arm64v8/openjdk:8-jdk-stretch
docker.io/arm64v8/openjdk:8-jdk-stretch

@runzexia
Copy link
Author

@wglambert
Sorry, I didn't say the problem clearly.
The alpine image as an example. The same tag in the alpine image will support multiple arches.
image
When I pull the image on a different arch host, docker will automatically pull the appropriate image. When using cross-platform builds, docker buildx also will automatically handle this .
So when I build an image based on alpine, I don't need to specify the image to pull arm64v8.

@james-crowley
Copy link

james-crowley commented Oct 10, 2019

@runzexia What we need is a proper Docker manifest file to manage multi-archs.

@tianon @yosifkit I know you guys are busy, but is it something you guys would think about supporting? I would like to get ppc64le and s390x support going here.

It looks like s390x and ppc64le are getting built by their buildslaves, is that coming from the "official" image builds? I could never tracked down an answer for where the arch buildslaves come from or who owns them.

@tianon
Copy link
Member

tianon commented Oct 10, 2019

See #272, especially the bits about where our actual artifacts come from, which will help explain why s390x/openjdk and ppc64le/openjdk are not currently being actively updated (note the "Updated 5 months ago" on the pages you linked). If you scroll down to "Supported tags and respective Dockerfile links", you'll see both sections of tags are completely empty to reflect that.

So more concretely, for OpenJDK 8 and 11 to support more architectures, you'd need to convince the folks maintaining the builds at https://adoptopenjdk.net/upstream.html to include builds for the desired architectures.

For OpenJDK 13+, you'd need to convince Oracle to include the desired architectures on https://jdk.java.net/13/ + https://jdk.java.net/14/.

Regarding @runzexia's specific question about arm64v8, OpenJDK 11 is the only version for which any sort of official arm64v8 builds exist, so thus that's the only version listed on https://hub.docker.com/r/arm64v8/openjdk.

That being said, there is now an explicit official AdoptOpenJDK image (https://hub.docker.com/_/adoptopenjdk) which does have much broader multi-architecture support.

@tianon tianon closed this as completed Oct 10, 2019
@james-crowley
Copy link

@tianon Thanks for the response. I see what you saying now. I was unaware that OpenJDK's only "official" releases where for x86_64. Been relying and using packages compiled by various distros.

Going forward, is there away to make it more clear on s390x/openjdk and the various other architectures, that they are no longer receiving updates? Other then the last update was 5 months ago, it is not very clear to the user.

If you scroll down to "Supported tags and respective Dockerfile links", you'll see both sections of tags are completely empty to reflect that.

I know you mentioned this, but honestly to someone reading the page it just looked like someone did not fill out this section.

I think some sort of explicit warning would be a better idea.

With that being said, I think the next best option is to use the AdoptOpenJDK image that you linked to.

@tianon
Copy link
Member

tianon commented Oct 11, 2019

Great idea -- docker-library/docs#1585 implements a better message for that edge case 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

4 participants