about summary refs log tree commit diff
path: root/third_party/apereo-cas/overlay/Dockerfile
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2020-07-05T13·05+0000
committerLuke Granger-Brown <git@lukegb.com>2020-07-05T19·17+0000
commitc22796eb2a4c9e9f04dcc098c7705a6ddfce81a5 (patch)
treefe8095e71f5cda8cdfd6c95e32a309dab88ffdc2 /third_party/apereo-cas/overlay/Dockerfile
parentf54a48f831dcbc0ff6c1879a4d27085a38eddccc (diff)
parent2e185f50c38db1a85f39a6bd5ad4c4e58462f003 (diff)
merge(3p/apereo-cas-overlay): Merge commit '2e185f50c38db1a85f39a6bd5ad4c4e58462f003' as 'third_party/apereo-cas/overlay'
Change-Id: Ic3590a8da009199100f6dd9f8c9c41196b5ea9ff
Diffstat (limited to 'third_party/apereo-cas/overlay/Dockerfile')
-rw-r--r--third_party/apereo-cas/overlay/Dockerfile40
1 files changed, 40 insertions, 0 deletions
diff --git a/third_party/apereo-cas/overlay/Dockerfile b/third_party/apereo-cas/overlay/Dockerfile
new file mode 100644
index 000000000000..17ab5648beb9
--- /dev/null
+++ b/third_party/apereo-cas/overlay/Dockerfile
@@ -0,0 +1,40 @@
+FROM adoptopenjdk/openjdk11:alpine-slim AS overlay
+
+RUN mkdir -p cas-overlay
+COPY ./src cas-overlay/src/
+COPY ./gradle/ cas-overlay/gradle/
+COPY ./gradlew ./settings.gradle ./build.gradle ./gradle.properties /cas-overlay/
+
+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 \
+    && ./gradlew clean build --parallel --no-daemon;
+
+FROM adoptopenjdk/openjdk11:alpine-jre AS cas
+
+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;
+
+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/
+COPY --from=overlay cas-overlay/build/libs/cas.war cas-overlay/
+
+EXPOSE 8080 8443
+
+ENV PATH $PATH:$JAVA_HOME/bin:.
+
+WORKDIR cas-overlay
+ENTRYPOINT ["java", "-server", "-noverify", "-Xmx2048M", "-jar", "cas.war"]