Home > Mobile >  java-8-openjdk-amd64 does not exist in container
java-8-openjdk-amd64 does not exist in container

Time:11-04

I keep receiving the below error when trying to run this hadoop docker container

docker run -it --name psu-hadoop-container -p 2222:22 -p 8042:8042 -p 9864:9864 -p 
9870:9870 -p 8088:8088 -p 10000:10000 -p 19888:19888 psu-hadoop
ERROR: JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 does not exist.
ERROR: JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 does not exist.
ERROR: JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 does not exist.
ERROR: JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 does not exist.
ERROR: JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 does not exist.

I'm working on a Mac. The DockerFile references the path java-8-openjdk-amd64 but I don't have that specific software, just jdk-19.jdk.

The Dockerfile is from a class and the class primarily uses PC.

Do I need to modify my JAVA_HOME? Do I need to modify the path in the Dockerfile?

CodePudding user response:

The Java version on your host doesn't matter.

If you have an M1/M2 Mac, then they won't run amd64 images unless you emulate it using --platform=linux/amd64.

Sounds like you'll also need to rebuild the Dockerfile with the same.

https://docs.docker.com/build/building/multi-platform/

  • Related