lti-provider/Dockerfile

33 lines
1.2 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM maven:3.9.9-eclipse-temurin-21-jammy AS build
COPY . /build
WORKDIR /build
RUN --mount=type=cache,target=/root/.m2/repository,rw \
mvn clean package -DskipTests -B
FROM eclipse-temurin:21-jdk AS extract
COPY --from=build /build/target/lti-provider-*.jar app.jar
RUN java -Djarmode=tools -jar app.jar extract --layers --destination extracted
FROM eclipse-temurin:21-jre
LABEL org.opencontainers.image.title="LTI Provider"
LABEL org.opencontainers.image.description="LTI провайдер для лабораторных по Docker и Kubernetes"
LABEL org.opencontainers.image.url="https://git.oa2.ru/dzyk/lti-provider"
LABEL org.opencontainers.image.source="https://git.oa2.ru/dzyk/lti-provider"
LABEL org.opencontainers.image.documentation="External Tool для LMS, для лабораторных работо по Docker и Kubernetes.
Поддерживает протокол LTI 1.3. Протестирован с OpenOLAT"
WORKDIR /opt
COPY --from=extract extracted/dependencies/ ./
COPY --from=extract extracted/spring-boot-loader/ ./
COPY --from=extract extracted/snapshot-dependencies/ ./
COPY --from=extract extracted/application/ ./
ENV TZ="Europe/Moscow"
ENV JAVA_TOOL_OPTIONS="-Xmx1g -Xms1g"
ENTRYPOINT ["java", "-jar", "/opt/app.jar"]