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

Container image issues for 11.0.7 #406

Closed marcdragon123 closed 3 years ago

marcdragon123 commented 4 years ago

When using docker-compose with a basic setup:

java8: image: openjdk:8u252 java11: image: openjdk:11.0.7

Java 8 has not problem starting however, Java 11 throws this exception:

ERROR: for compose-java-containers_java11_1  Cannot start service java11: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"jshell\": executable file not found in $PATH": unknown

ERROR: for java11  Cannot start service java11: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"jshell\": executable file not found in $PATH": unknown
ERROR: Encountered errors while bringing up the project.

Can you look into this issue

tianon commented 4 years ago

Seems like openjdk:11.0.7 doesn't have jshell for some reason, but I'm also really confused why you're not setting an explicit command:? What are you hoping to accomplish with this YAML?

marcdragon123 commented 4 years ago

I was just testing something locally but I usually do set a specific command

marcdragon123 commented 4 years ago

I was trying to see if I could have two java containers run separate java versions. Which would allow me to not clutter my comp with multiple java versions.

version: '2'

services: java11: image: openjdk:11.0.7 volumes:

I had made this yaml compose. I got both running. I have run docker exec -it compose-java-containers_java8_1 /bin/bash to determine if the java binary was there and I am unable to find it on both of them.

wglambert commented 4 years ago

https://github.com/docker-library/openjdk/issues/375#issuecomment-557756737 The upstream binaries for 11 don't have jshell https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases/

https://github.com/docker-library/openjdk/pull/376

marcdragon123 commented 4 years ago

I see the original comments, I was not using the JRE or the JDK, Could this also be an issue in the JDK images?

tianon commented 4 years ago

These images are based on Debian, Oracle Linux, and Windows -- using Ubuntu's APT repos in them is going to be a recipe for a Bad Time™. What is it you're hoping to accomplish by doing so?

lifeModder19135 commented 3 years ago

@tianon Should be a-ok with Debian, no.. After all, it is the default package mgmt. tool for the Debian OS. Also, Debian nd Ubuntu are VERY similar in regards to keywords file formats, etc. Ubuntu is a child product of Debian (but I am guessing you knew that though)

tianon commented 3 years ago

This appears to be an environmental/setup issue, not an issue with the image. As such, I'm going to close.

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.