This repository has been archived by the owner on May 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathDockerfile
50 lines (38 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM centos:centos7
MAINTAINER Apereo Foundation
ENV PATH=$PATH:$JRE_HOME/bin
ARG cas_version
RUN yum -y install wget tar unzip git \
&& yum -y clean all
# Download Azul Java, verify the hash, and install \
RUN set -x; \
java_version=11.0.3; \
zulu_version=11.31.11-ca; \
java_hash=20218b15ae5ef1318aed1a3d5dde3219; \
cd / \
&& wget http://cdn.azul.com/zulu/bin/zulu$zulu_version-jdk$java_version-linux_x64.tar.gz \
&& echo "$java_hash zulu$zulu_version-jdk$java_version-linux_x64.tar.gz" | md5sum -c - \
&& tar -zxvf zulu$zulu_version-jdk$java_version-linux_x64.tar.gz -C /opt \
&& rm zulu$zulu_version-jdk$java_version-linux_x64.tar.gz \
&& ln -s /opt/zulu$zulu_version-jdk$java_version-linux_x64/ /opt/java-home;
# Download the CAS overlay project \
RUN cd / \
&& git clone --depth 1 --single-branch -b $cas_version https://github.com/apereo/cas-overlay-template.git cas-overlay \
&& mkdir -p /etc/cas \
&& mkdir -p cas-overlay/bin;
COPY thekeystore /etc/cas/
COPY bin/*.* cas-overlay/
COPY etc/cas/config/*.* /cas-overlay/etc/cas/config/
COPY etc/cas/services/*.* /cas-overlay/etc/cas/services/
RUN chmod 750 cas-overlay/gradlew \
&& chmod 750 cas-overlay/*.sh \
&& chmod 750 /opt/java-home/bin/java;
EXPOSE 8080 8443
WORKDIR /cas-overlay
ENV JAVA_HOME /opt/java-home
ENV PATH $PATH:$JAVA_HOME/bin:.
RUN mkdir -p ~/.gradle \
&& echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties \
&& ./gradlew clean build --parallel \
&& rm -rf /root/.gradle
CMD ["/cas-overlay/run-cas.sh"]