2023-08-02 01:30:48 -04:00
|
|
|
ARG BASE_IMAGE="eclipse-temurin:17-jdk"
|
|
|
|
ARG EXT_BUILD_COMMANDS=""
|
|
|
|
ARG EXT_BUILD_OPTIONS=""
|
|
|
|
|
|
|
|
FROM $BASE_IMAGE AS overlay
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
RUN mkdir -p cas-overlay
|
|
|
|
COPY ./src cas-overlay/src/
|
|
|
|
COPY ./gradle/ cas-overlay/gradle/
|
2023-08-02 01:30:48 -04:00
|
|
|
COPY ./gradlew ./settings.gradle ./build.gradle ./gradle.properties ./lombok.config /cas-overlay/
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
RUN mkdir -p ~/.gradle \
|
|
|
|
&& echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties \
|
|
|
|
&& echo "org.gradle.configureondemand=true" >> ~/.gradle/gradle.properties \
|
|
|
|
&& cd cas-overlay \
|
|
|
|
&& chmod 750 ./gradlew \
|
|
|
|
&& ./gradlew --version;
|
|
|
|
|
|
|
|
RUN cd cas-overlay \
|
2023-08-02 01:30:48 -04:00
|
|
|
&& ./gradlew clean build $EXT_BUILD_COMMANDS --parallel --no-daemon $EXT_BUILD_OPTIONS;
|
2020-03-29 16:36:54 -04:00
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
FROM $BASE_IMAGE AS cas
|
2020-03-29 16:36:54 -04:00
|
|
|
|
|
|
|
LABEL "Organization"="Apereo"
|
|
|
|
LABEL "Description"="Apereo CAS"
|
|
|
|
|
|
|
|
RUN cd / \
|
|
|
|
&& mkdir -p /etc/cas/config \
|
|
|
|
&& mkdir -p /etc/cas/services \
|
|
|
|
&& mkdir -p /etc/cas/saml \
|
|
|
|
&& mkdir -p cas-overlay;
|
|
|
|
|
2023-08-02 01:30:48 -04:00
|
|
|
COPY --from=overlay cas-overlay/build/libs/cas.war cas-overlay/
|
2020-03-29 16:36:54 -04:00
|
|
|
COPY etc/cas/ /etc/cas/
|
|
|
|
COPY etc/cas/config/ /etc/cas/config/
|
|
|
|
COPY etc/cas/services/ /etc/cas/services/
|
|
|
|
COPY etc/cas/saml/ /etc/cas/saml/
|
|
|
|
|
|
|
|
EXPOSE 8080 8443
|
|
|
|
|
|
|
|
ENV PATH $PATH:$JAVA_HOME/bin:.
|
|
|
|
|
|
|
|
WORKDIR cas-overlay
|
|
|
|
ENTRYPOINT ["java", "-server", "-noverify", "-Xmx2048M", "-jar", "cas.war"]
|