jruby / docker-jruby

MIT License
18 stars 27 forks source link

Support Java 9 #34

Closed perlun closed 4 years ago

perlun commented 6 years ago

(and eventually 10, but Java 10 doesn't work well with JRuby right now because of https://github.com/jruby/jruby-openssl/issues/157)

I started working on this, using the diff below:

diff --git a/9000/alpine-jdk/Dockerfile b/9000/alpine-jdk/Dockerfile
index 7550d69..8b9ef05 100644
--- a/9000/alpine-jdk/Dockerfile
+++ b/9000/alpine-jdk/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:8-jdk-alpine
+FROM openjdk:9-jdk-alpine

 RUN apk add --no-cache \
       bash \
diff --git a/9000/alpine-jre/Dockerfile b/9000/alpine-jre/Dockerfile
index 4ea0c3e..0ce9755 100644
--- a/9000/alpine-jre/Dockerfile
+++ b/9000/alpine-jre/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre-alpine
+FROM openjdk:9-jre-alpine

 RUN apk add --no-cache \
       bash \
diff --git a/9000/jdk/Dockerfile b/9000/jdk/Dockerfile
index a096af3..5332f32 100644
--- a/9000/jdk/Dockerfile
+++ b/9000/jdk/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:8-jdk
+FROM openjdk:9-jdk

 RUN apt-get update && apt-get install -y libc6-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*

diff --git a/9000/jre/Dockerfile b/9000/jre/Dockerfile
index 266aa9e..20fa243 100644
--- a/9000/jre/Dockerfile
+++ b/9000/jre/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:8-jre
+FROM openjdk:9-jre

 RUN apt-get update && apt-get install -y libc6-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*

...but it runs into errors here:

Step 7/13 : RUN mkdir -p /opt/jruby/etc     && {        echo 'install: --no-document';      echo 'update: --no-document';   } >> /opt/jruby/etc/gemrc
 ---> Running in 9aff8ade3ed6
Removing intermediate container 9aff8ade3ed6
 ---> 6cced58c0cf5
Step 8/13 : RUN gem install bundler
 ---> Running in 158ba0d23283
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/opt/jruby/lib/ruby/stdlib/jopenssl.jar) to constructor java.security.cert.CertificateFactory(java.security.cert.CertificateFactorySpi,java.security.Provider,java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
ERROR:  Loading command: install (OpenSSL::X509::StoreError)
    setting default path failed: the trustAnchors parameter must be non-empty
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
The command '/bin/sh -c gem install bundler' returned a non-zero code: 1

So, this seems to be somewhat more work. I think it would be a noteworthy goal to support Java 9 (and eventually Java 10), so I suggest we'll leave this issue until someone picks it up and completes it. Java 8 is still supported, but will likely be EOL:ed at some point.

cpuguy83 commented 6 years ago

Yes, it seems there's still some issues on the jruby repo with 1.9.

cpuguy83 commented 4 years ago

I've added support for java 11, 14, and 15. Thanks!