docker-library / openjdk

Docker Official Image packaging for EA builds of OpenJDK from Oracle
http://openjdk.java.net
MIT License
1.14k stars 471 forks source link

I am seeing ERROR [internal] load metadata for docker.io/arm64v8/openjdk:11 #486

Closed spachari-im closed 2 years ago

spachari-im commented 2 years ago

Hello,

I am trying to use the arm64v8/openjdk:11 Docker image (https://hub.docker.com/r/arm64v8/openjdk/) in my project. Here is my Dockerfile.

FROM arm64v8/openjdk:11
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=sandbox", "/app.jar"]

I have ensured that I am logged in to Docker from the CLI before building the image.

When building the Docker image with the command docker build -t im/my-test . I get the following error:

[internal] load build definition from Dockerfile                                                                                                         0.0s
transferring dockerfile: 37B                                                                                                                          0.0s
[internal] load .dockerignore                                                                                                                            0.0s
transferring context: 2B                                                                                                                              0.0s
ERROR [internal] load metadata for docker.io/arm64v8/openjdk:11                                                                                          0.8s
[internal] load metadata for docker.io/arm64v8/openjdk:11:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:f5605bae78f07b3d11ef33049f3563c33051b9f76351b7412bc0bde4f8bea871: not found

Can anyone please help?

tianon commented 2 years ago

This is probably because arm64v8/openjdk:11 is a manifest list and you're likely attempting to build on a non-arm64v8 platform like amd64, right?

I would suggest trying one or the other of FROM arm64v8/openjdk:11-oracle or FROM --platform linux/arm64/v8 openjdk:11 (or using --platform linux/arm64/v8 on docker build).

In the future, these sorts of questions/requests would be more appropriately posted to a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow.