Docker Community Forums

Share and learn in the Docker community.

Gradle docker with JCE included

(01041982) #1

Hi all,

We are compiling Java code using a Jenkins build.
The Jenkins slave pulls the latest Gradle docker image and runs it for compilation.
We now have a new requirement: JCE is required for compilation.
We are requested to add it under java installation->jre->security.
As far as I can see it, my options are:

  1. Find a docker image which includes both Gradle and JCE, OR:
  2. Stop downloading Gradle latest each build, and instead use a customized image, including JCE.

Would appreciate if anyone can tell me:

  1. Is there a docker image for Gradle, including JCE? The host is running RedHat 7.
  2. Must JCE be included in the Gradle container? Is there any way it can consume it from the host?


(Sam) #2

search dockerhub for gradle

there are quite a few images available

(David Maze) #3

I’d suggest starting with the search box on top of Oracle’s JCA documentation notes that JCE is a standard part of the Java SDK now; the only thing you might need is the very small crypto policy file, which should be easy enough to COPY in your Dockerfile.

Docker containers are designed to be independent from the host and can’t consume arbitrary files, libraries, policy configurations, etc. There is a path to attach content to the container at runtime but if something is needed for the application to run at all then it’s better to build it into the image.