2020-02-11 00:57:53 +00:00
|
|
|
FROM openjdk:11-jdk as builder
|
2020-02-13 03:15:43 +00:00
|
|
|
MAINTAINER William Brawner <me@wbrawner.com>
|
2019-09-24 16:28:30 +00:00
|
|
|
|
2020-02-13 03:15:43 +00:00
|
|
|
RUN groupadd --system --gid 1000 gradle \
|
|
|
|
&& useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle
|
2019-09-24 16:28:30 +00:00
|
|
|
|
2020-02-13 03:15:43 +00:00
|
|
|
COPY --chown=gradle:gradle . /home/gradle/src
|
|
|
|
WORKDIR /home/gradle/src
|
|
|
|
RUN /home/gradle/src/gradlew bootJar
|
2019-09-24 16:28:30 +00:00
|
|
|
|
2020-02-11 00:57:53 +00:00
|
|
|
FROM openjdk:11-jdk-slim
|
2019-09-24 16:28:30 +00:00
|
|
|
EXPOSE 8080
|
2020-02-13 03:15:43 +00:00
|
|
|
COPY --from=builder /home/gradle/src/build/libs/budget-server-*.jar budget-api.jar
|
2020-02-11 00:57:53 +00:00
|
|
|
ENTRYPOINT ["/usr/local/openjdk-11/bin/java", "-Xmx256M", "-jar", "/budget-api.jar"]
|