Software Developer ·
Needs advice
on
DockerDockerGradleGradle
and
JavaJava

Hi, I'm working on dockerizing a heavy Java EE application where the process of installation requires a complex process maintained by a Gradle project we've developed to install, configure and customize specific jar files to generate a runnable server application at the end for the user. I'm new to Docker. As I said, the problem is that we have got a long process to install the app. The first alternative pop into my head is to put the installer Gradle project in the docker image and manage stateful data using the writable layer (in this case, I need to add Gradle too and the writable layer will be too heavy). Any advice! Thank you

READ LESS
8 upvotes·60.3K views
Replies (1)
Freelancer Engineer ·
Recommends
on
Docker

Docker multi-stage builds would allow you to create an intermediary image where the concerns of installing the app would be isolated (gradle, etc) Once jar is built, you copy it over a simple java docker image for deployment into your docker target production runtime. You can build these images locally or through some CICD server.

Here's an exemple with Gradle

READ MORE
8 upvotes·11.3K views
Avatar of Hajed Khlifi

Hajed Khlifi

Software Developer