-
Notifications
You must be signed in to change notification settings - Fork 191
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
JDK11 crashed in this base image #37
Comments
I have no idea why this may happen. I can only suggest using OpenJDK compiled for musl libc. |
FYI: I am maintaining some company internal docker images based on this Dockerfile and the AdoptOpenJDK Version: https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/11/jdk/alpine/Dockerfile.hotspot.releases.full In the AdoptOpenJDK Dockerfile, ZLIB and GCC_LIBS are installed. I just run a test without ZLIB nor GCC_LIBS and while JDK8 works well, JDK10, 11 and 13 crashed. |
I just installed Zulu OpenJDK 11.0.7 JRE into this base image:
This is
This is
I guess java still links against musl instead of glibc. Any ideas? Setting |
Went over some closed tickets. @frol indicates that
Something is obviously working right. I'm a bit surprised to see |
Try running the binary explicitly with
|
Same behavior—zlib still leads to musl being loaded: Ran it with
|
We've been able to get the JVM not to crash by lifting a prebuilt glibc-based zlib from another distro (forgot where I saw this, perhaps on a different ticket in this repo). However, we don't feel good about rolling that to production. Still looking for a better solution. |
If you do not need a very specific build of JDK, you can install Alpine packages for JDK 8 or 11: FROM alpine:3.12
RUN apk --no-cache add openjdk8-jre FROM alpine:3.12
RUN apk --no-cache add openjdk11-jre |
Or just use the official https://hub.docker.com/_/openjdk image, which has Alpine tags. |
Dockerfile:
when enter container and input command:
Why this happened? Can someone help me? Thanks very much!
The text was updated successfully, but these errors were encountered: