2021-08-05 23:36:48 -04:00
|
|
|
ARG GRADLE_VERSION=7.1
|
2021-02-11 15:06:48 -05:00
|
|
|
ARG JAVA_VERSION=11
|
2021-08-05 23:36:48 -04:00
|
|
|
ARG CRE_VERSION=dev
|
2021-02-11 15:06:48 -05:00
|
|
|
|
2021-08-05 23:36:48 -04:00
|
|
|
FROM gradle:$GRADLE_VERSION-jdk$JAVA_VERSION AS build
|
|
|
|
WORKDIR /usr/src
|
2021-02-11 15:06:48 -05:00
|
|
|
|
2021-08-05 23:36:48 -04:00
|
|
|
COPY . .
|
|
|
|
RUN gradle bootJar -Pversion=$CRE_VERSION
|
2021-02-11 15:06:48 -05:00
|
|
|
|
2021-08-05 23:36:48 -04:00
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /usr/bin
|
|
|
|
|
|
|
|
ARG JAVA_VERSION
|
|
|
|
RUN apk add --no-cache openjdk$JAVA_VERSION
|
|
|
|
|
|
|
|
ARG CRE_VERSION
|
|
|
|
COPY --from=build /usr/src/build/libs/ColorRecipesExplorer.jar ColorRecipesExplorer.jar
|
2021-02-11 15:06:48 -05:00
|
|
|
|
2021-08-01 17:21:11 -04:00
|
|
|
ARG CRE_PORT=9090
|
|
|
|
EXPOSE $CRE_PORT
|
2021-02-11 15:06:48 -05:00
|
|
|
|
|
|
|
ENV spring_profiles_active=h2,rest
|
2021-08-01 21:55:51 -04:00
|
|
|
ENV server_port=$CRE_PORT
|
2021-02-11 15:06:48 -05:00
|
|
|
ENV spring_datasource_url=jdbc:h2:mem:cre
|
|
|
|
ENV spring_datasource_username=root
|
|
|
|
ENV spring_datasource_password=pass
|
|
|
|
|
2021-08-05 23:36:48 -04:00
|
|
|
VOLUME /usr/bin/data
|
|
|
|
VOLUME /usr/bin/config
|
2021-03-06 21:24:30 -05:00
|
|
|
|
2021-02-11 15:06:48 -05:00
|
|
|
ENTRYPOINT ["java", "-jar", "ColorRecipesExplorer.jar"]
|