lc-core/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
961 B
Docker
Raw Normal View History

2024-03-04 09:27:07 +05:30
FROM eclipse-temurin:17-jre-jammy AS base-builder
2022-10-11 07:36:21 +05:30
ARG SBT_VERSION=1.7.1
ENV JAVA_HOME="/usr/lib/jvm/default-jvm/"
ENV PATH=$PATH:${JAVA_HOME}/bin
RUN \
2023-01-13 15:35:27 +02:00
apt update && \
apt install -y wget && \
wget -O sbt-$SBT_VERSION.tgz https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz && \
2022-03-02 12:19:00 +01:00
tar -xzvf sbt-$SBT_VERSION.tgz && \
rm sbt-$SBT_VERSION.tgz
ENV PATH=$PATH:/sbt/bin/
FROM base-builder AS sbt-builder
WORKDIR /build
COPY lib/ lib/
COPY project/plugins.sbt project/
COPY build.sbt .
RUN sbt assembly
FROM sbt-builder as builder
COPY src/ src/
RUN sbt assembly
2024-03-04 09:27:07 +05:30
FROM eclipse-temurin:17-jre-jammy AS base-core
ENV JAVA_HOME="/usr/lib/jvm/default-jvm/"
2024-03-04 09:32:39 +05:30
RUN apt update && apt install -y fonts-dejavu
ENV PATH=$PATH:${JAVA_HOME}/bin
FROM base-core
WORKDIR /lc-core
2024-10-25 10:03:18 +05:30
COPY --from=builder /build/target/scala-3.5.2/LibreCaptcha.jar .
RUN mkdir data/
EXPOSE 8888
CMD [ "java", "-jar", "LibreCaptcha.jar" ]