This patch optimizes the java-worker image;
- Use multi-stage build to separate the build-stage from the "deploy" stage
- Switch to the official Maven image, instead of manual installation of Maven.
The official Maven image is also based on the `openjdk` repository on Docker
Hub, which replaces the (now deprecated) `java` repository.
- Use `COPY` instead of `ADD` to follow best-practice
- Add `-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap` arguments
so that JAVA will take memory-limits into account
- Use a JRE base image for the final build-stage
This change brings the size of the final image down from 184MB to 87MB
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The separate vote-apps directory was because networking didn't
used to support aliases to remove the project name.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>