You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Rob Vesse <rv...@dotnetrdf.org> on 2019/04/17 13:38:45 UTC

JDK vs JRE in Docker Images

Folks

 

For those using the Kubernetes support and building custom images are you using a JDK or a JRE in the container images?

 

Using a JRE saves a reasonable chunk of image size (about 50MB with our preferred Linux distro) but I didn’t want to make this change if there was a reason to have a JDK available.  Certainly the official project integration tests run just fine with a JRE based image

 

Currently the projects official Docker files use openjdk:8-alpine as a base which includes a full JDK so didn’t know if that was intentional or just convenience?

 

Thanks,

 

Rob


Re: JDK vs JRE in Docker Images

Posted by Stavros Kontopoulos <st...@lightbend.com>.
Hi Rob,

We are using registry.redhat.io/redhat-openjdk-18/openjdk18-openshift (
https://docs.openshift.com/online/using_images/s2i_images/java.html)
It looks most convenient as Red Hat leads the openjdk updates which is even
more important from now on and also from a security
point of view.
There are some tools you might want to use at runtime like jstack, jps when
debugging apps so it might be more convenient to have jdk but
shouldnt be a requirement unless Spark does any compilation on the fly
behind the scenes (besides use of janino) or you need to use a tool like
keytool at container startup.

Best,
Stavros

On Wed, Apr 17, 2019 at 4:49 PM Rob Vesse <rv...@dotnetrdf.org> wrote:

> Folks
>
>
>
> For those using the Kubernetes support and building custom images are you
> using a JDK or a JRE in the container images?
>
>
>
> Using a JRE saves a reasonable chunk of image size (about 50MB with our
> preferred Linux distro) but I didn’t want to make this change if there was
> a reason to have a JDK available.  Certainly the official project
> integration tests run just fine with a JRE based image
>
>
>
> Currently the projects official Docker files use openjdk:8-alpine as a
> base which includes a full JDK so didn’t know if that was intentional or
> just convenience?
>
>
>
> Thanks,
>
>
>
> Rob
>

FW: JDK vs JRE in Docker Images

Posted by Rob Vesse <rv...@dotnetrdf.org>.
    Sean
    
    Thanks for the pointers.
    
    Janino specifically says it only requires a JRE - https://janino-compiler.github.io/janino/#requirements
    
    As for scalac can't find a specific reference anywhere, appears to be self-contained AFAICT
    
    Rob
    
    On 17/04/2019, 18:56, "Sean Owen" <sr...@gmail.com> wrote:
    
        I confess I don't know, but I don't think scalac or janino need javac
        and related tools, and those are the only things that come to mind. If
        the tests pass without a JDK, that's good evidence.
        
        On Wed, Apr 17, 2019 at 8:49 AM Rob Vesse <rv...@dotnetrdf.org> wrote:
        >
        > Folks
        >
        >
        >
        > For those using the Kubernetes support and building custom images are you using a JDK or a JRE in the container images?
        >
        >
        >
        > Using a JRE saves a reasonable chunk of image size (about 50MB with our preferred Linux distro) but I didn’t want to make this change if there was a reason to have a JDK available.  Certainly the official project integration tests run just fine with a JRE based image
        >
        >
        >
        > Currently the projects official Docker files use openjdk:8-alpine as a base which includes a full JDK so didn’t know if that was intentional or just convenience?
        >
        >
        >
        > Thanks,
        >
        >
        >
        > Rob
        
        ---------------------------------------------------------------------
        To unsubscribe e-mail: dev-unsubscribe@spark.apache.org
        
        
    
    
    
    
    





---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org


Re: JDK vs JRE in Docker Images

Posted by Rob Vesse <rv...@dotnetrdf.org>.
Sean

Thanks for the pointers.

Janino specifically says it only requires a JRE - https://janino-compiler.github.io/janino/#requirements

As for scalac can't find a specific reference anywhere, appears to be self-contained AFAICT

Rob

On 17/04/2019, 18:56, "Sean Owen" <sr...@gmail.com> wrote:

    I confess I don't know, but I don't think scalac or janino need javac
    and related tools, and those are the only things that come to mind. If
    the tests pass without a JDK, that's good evidence.
    
    On Wed, Apr 17, 2019 at 8:49 AM Rob Vesse <rv...@dotnetrdf.org> wrote:
    >
    > Folks
    >
    >
    >
    > For those using the Kubernetes support and building custom images are you using a JDK or a JRE in the container images?
    >
    >
    >
    > Using a JRE saves a reasonable chunk of image size (about 50MB with our preferred Linux distro) but I didn’t want to make this change if there was a reason to have a JDK available.  Certainly the official project integration tests run just fine with a JRE based image
    >
    >
    >
    > Currently the projects official Docker files use openjdk:8-alpine as a base which includes a full JDK so didn’t know if that was intentional or just convenience?
    >
    >
    >
    > Thanks,
    >
    >
    >
    > Rob
    
    ---------------------------------------------------------------------
    To unsubscribe e-mail: dev-unsubscribe@spark.apache.org
    
    





Re: JDK vs JRE in Docker Images

Posted by Sean Owen <sr...@gmail.com>.
I confess I don't know, but I don't think scalac or janino need javac
and related tools, and those are the only things that come to mind. If
the tests pass without a JDK, that's good evidence.

On Wed, Apr 17, 2019 at 8:49 AM Rob Vesse <rv...@dotnetrdf.org> wrote:
>
> Folks
>
>
>
> For those using the Kubernetes support and building custom images are you using a JDK or a JRE in the container images?
>
>
>
> Using a JRE saves a reasonable chunk of image size (about 50MB with our preferred Linux distro) but I didn’t want to make this change if there was a reason to have a JDK available.  Certainly the official project integration tests run just fine with a JRE based image
>
>
>
> Currently the projects official Docker files use openjdk:8-alpine as a base which includes a full JDK so didn’t know if that was intentional or just convenience?
>
>
>
> Thanks,
>
>
>
> Rob

---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org