Build a legacy software with docker

Cindy Piassale21/01/2020

Following the rework of a legacy application in GWT for a client, we encountered problems during compilation. Indeed it required the installation of old libraries not available on the current environments of the developers.

The idea was therefore to provide a functional compilation solution on any environment :

  • developer workstation

  • client workstation

  • development / integration server

For that purpose we have decided to use docker. We created a docker image from a maven image, on which we downloaded the GWT libraries necessary for the compilation of the project.

Which gives the following Dockerfile :
FROM maven:3.6-jdk-7

RUN curl | tar xjf -

Then we created a script to start the compilation :
docker build -t mvn-gwt -f .
docker run \
  -v ~/.m2:/var/maven/.m2 \
  -v "$PWD":/usr/local/src/ \
  -w /usr/local/src/  \
  -ti --rm -u $(id -u) \
  -e MAVEN_CONFIG=/var/maven/.m2 \
  mvn-gwt \
  mvn -Duser.home=/var/maven -Dgoogle.webtoolkit.home=/var/gwt-linux-1.5.3 $1

From this script the compilation of the project can be started from any environment by simply running the command :

./ <target_maven>

A propos de JECI

Maintenance Logicielle, Conteneur (Docker, Kubernetes), Alfresco Community, Logiciels Libres
SARL - Capital : 100 000 €, immatriculée au RCS de Dijon

Nous contacter

+33 9 72 38 21 92

2013-2022 Jeci | Mixed with v4.6.1 | Baked with JBake v2.6.7 | Photo by Troy Mortier on Unsplash | Mentions légales