joal/Dockerfile

29 lines
636 B
Docker
Raw Permalink Normal View History

2019-03-15 06:46:00 +08:00
# Builder image with jdk
2021-11-17 05:34:53 +08:00
FROM maven:3.8.3-eclipse-temurin-11 AS build
2017-10-09 05:13:49 +08:00
2021-07-17 08:27:11 +08:00
WORKDIR /build
2021-07-17 08:33:28 +08:00
COPY . /build/
2017-10-09 05:13:49 +08:00
2021-07-17 15:50:02 +08:00
RUN mvn -B --quiet package -DskipTests=true \
&& mkdir /artifact \
2021-07-17 08:40:27 +08:00
&& mv /build/target/jack-of-all-trades-*.jar /artifact/joal.jar
2019-03-15 06:46:00 +08:00
# Actual joal image with jre only
2021-11-17 05:34:53 +08:00
FROM eclipse-temurin:11.0.13_8-jre
2019-03-15 06:46:00 +08:00
2019-03-19 21:12:47 +08:00
LABEL name="joal"
LABEL maintainer="joal.contact@gmail.com"
LABEL url="https://github.com/anthonyraymond/joal"
LABEL vcs-url="https://github.com/anthonyraymond/joal"
2019-03-15 06:46:00 +08:00
WORKDIR /joal/
2017-10-09 05:13:49 +08:00
2019-03-15 06:46:00 +08:00
COPY --from=build /artifact/joal.jar /joal/joal.jar
2017-10-09 05:13:49 +08:00
VOLUME /data
ENTRYPOINT ["java", "-jar", "/joal/joal.jar"]
2019-03-19 21:12:47 +08:00
CMD ["--joal-conf=/data"]