2019-09-24 16:28:30 +00:00
|
|
|
FROM openjdk:8-jdk as builder
|
2019-05-23 04:54:15 +00:00
|
|
|
MAINTAINER Billy Brawner <billy@wbrawner.com>
|
2019-09-24 16:28:30 +00:00
|
|
|
|
|
|
|
RUN groupadd --system --gid 1000 maven \
|
|
|
|
&& useradd --system --gid maven --uid 1000 --shell /bin/bash --create-home maven \
|
|
|
|
&& mkdir /home/maven/.m2 \
|
|
|
|
&& chown --recursive maven:maven /home/maven \
|
|
|
|
&& ln -s /home/maven/.m2 /root/.m2
|
|
|
|
|
|
|
|
COPY --chown=maven:maven . /home/maven/src
|
|
|
|
WORKDIR /home/maven/src
|
|
|
|
RUN /home/maven/src/mvnw -DskipTests package
|
|
|
|
|
|
|
|
FROM openjdk:8-jdk-slim
|
|
|
|
EXPOSE 8080
|
2019-09-24 16:33:21 +00:00
|
|
|
COPY --from=builder /home/maven/src/target/budget-api.jar budget-api.jar
|
|
|
|
ENTRYPOINT ["/usr/local/openjdk-8/bin/java", "-Xmx3g", "-jar", "/budget-api.jar"]
|
2019-09-24 16:28:30 +00:00
|
|
|
|
|
|
|
|