2024-03-03 22:57:07 -05:00
|
|
|
FROM eclipse-temurin:17-jre-jammy AS base-builder
|
2022-10-10 22:06:21 -04:00
|
|
|
ARG SBT_VERSION=1.7.1
|
2021-03-29 06:02:06 -04:00
|
|
|
ENV JAVA_HOME="/usr/lib/jvm/default-jvm/"
|
|
|
|
ENV PATH=$PATH:${JAVA_HOME}/bin
|
|
|
|
RUN \
|
2023-01-13 08:35:27 -05:00
|
|
|
apt update && \
|
|
|
|
apt install -y wget && \
|
2021-03-29 06:02:06 -04:00
|
|
|
wget -O sbt-$SBT_VERSION.tgz https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz && \
|
2022-03-02 06:19:00 -05:00
|
|
|
tar -xzvf sbt-$SBT_VERSION.tgz && \
|
|
|
|
rm sbt-$SBT_VERSION.tgz
|
2021-03-29 06:02:06 -04:00
|
|
|
|
|
|
|
ENV PATH=$PATH:/sbt/bin/
|
|
|
|
|
|
|
|
|
2021-03-31 04:09:53 -04:00
|
|
|
FROM base-builder AS sbt-builder
|
2021-03-29 06:02:06 -04:00
|
|
|
WORKDIR /build
|
|
|
|
COPY lib/ lib/
|
|
|
|
COPY project/plugins.sbt project/
|
|
|
|
COPY build.sbt .
|
|
|
|
RUN sbt assembly
|
|
|
|
|
2021-03-31 04:09:53 -04:00
|
|
|
FROM sbt-builder as builder
|
|
|
|
COPY src/ src/
|
|
|
|
RUN sbt assembly
|
2021-03-29 06:02:06 -04:00
|
|
|
|
2024-03-03 22:57:07 -05:00
|
|
|
FROM eclipse-temurin:17-jre-jammy AS base-core
|
2021-03-29 06:02:06 -04:00
|
|
|
ENV JAVA_HOME="/usr/lib/jvm/default-jvm/"
|
2023-01-13 08:35:27 -05:00
|
|
|
RUN apt update && apt install -y ttf-dejavu
|
2021-03-29 06:02:06 -04:00
|
|
|
ENV PATH=$PATH:${JAVA_HOME}/bin
|
|
|
|
|
|
|
|
|
|
|
|
FROM base-core
|
|
|
|
WORKDIR /lc-core
|
2024-03-03 22:02:35 -05:00
|
|
|
COPY --from=builder /build/target/scala-3.3.3/LibreCaptcha.jar .
|
2021-03-29 06:02:06 -04:00
|
|
|
RUN mkdir data/
|
|
|
|
|
|
|
|
EXPOSE 8888
|
|
|
|
|
2021-03-31 04:09:53 -04:00
|
|
|
CMD [ "java", "-jar", "LibreCaptcha.jar" ]
|