Skip to content
Permalink
Newer
Older
100644 108 lines (81 sloc) 3.67 KB
1
#
2
# Building assumes midpoint-3.9-SNAPSHOT-dist.tar.gz is present in the current directory.
3
#
4
5
FROM tier/shibboleth_sp
6
7
MAINTAINER info@evolveum.com
8
9
RUN rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
10
RUN curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo
11
RUN yum -y update
12
RUN yum -y install \
13
zulu-8 \
14
cron \
15
supervisor \
16
libcurl \
17
&& yum clean -y all
18
19
RUN rm /etc/shibboleth/sp-key.pem /etc/shibboleth/sp-cert.pem \
20
&& cd /etc/httpd/conf.d/ \
21
&& rm -f autoindex.conf ssl.conf userdir.conf welcome.conf
22
23
COPY container_files/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
24
COPY container_files/httpd/conf/* /etc/httpd/conf.d/
25
COPY container_files/shibboleth/* /etc/shibboleth/
26
COPY container_files/usr-local-bin/* /usr/local/bin/
27
COPY container_files/opt-tier/* /opt/tier/
28
29
RUN chmod 755 /opt/tier/setenv.sh \
30
&& chmod 755 /usr/local/bin/sendtierbeacon.sh \
31
&& chmod 755 /usr/local/bin/setup-cron.sh \
32
&& chmod 755 /usr/local/bin/start-midpoint.sh \
33
&& chmod 755 /usr/local/bin/start-httpd.sh \
34
&& chmod 755 /usr/local/bin/startup.sh
35
36
RUN cp /dev/null /etc/httpd/conf.d/ssl.conf \
37
&& sed -i 's/LogFormat "/LogFormat "httpd;access_log;%{ENV}e;%{USERTOKEN}e;/g' /etc/httpd/conf/httpd.conf \
38
&& echo -e "\nErrorLogFormat \"httpd;error_log;%{ENV}e;%{USERTOKEN}e;[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i\"" >> /etc/httpd/conf/httpd.conf \
39
&& sed -i 's/CustomLog "logs\/access_log"/CustomLog "\/tmp\/loghttpd"/g' /etc/httpd/conf/httpd.conf \
40
&& sed -i 's/ErrorLog "logs\/error_log"/ErrorLog "\/tmp\/loghttpd"/g' /etc/httpd/conf/httpd.conf \
41
&& echo -e "\nPassEnv ENV" >> /etc/httpd/conf/httpd.conf \
42
&& echo -e "\nPassEnv USERTOKEN" >> /etc/httpd/conf/httpd.conf
43
44
# Build arguments
45
46
ARG MP_VERSION=3.9-SNAPSHOT
47
ARG MP_DIST_FILE=midpoint-${MP_VERSION}-dist.tar.gz
48
49
ENV MP_DIR /opt/midpoint
50
51
RUN mkdir -p ${MP_DIR}/var
53
COPY ${MP_DIST_FILE} ${MP_DIR}
54
COPY container_files/mp-dir/ ${MP_DIR}/
55
56
RUN echo 'Extracting midPoint archive...' \
57
&& tar xzf ${MP_DIR}/midpoint-${MP_VERSION}-dist.tar.gz -C ${MP_DIR} --strip-components=1
58
59
VOLUME ${MP_DIR}/var
60
61
# Repository parameters
62
63
ENV REPO_HOST midpoint-data
64
ENV REPO_PORT default
65
ENV REPO_USER root
66
ENV REPO_DATABASE midpoint
67
ENV REPO_JDBC_URL default
68
ENV REPO_PASSWORD_FILE /run/secrets/m_database_password.txt
69
ENV REPO_DATABASE_TYPE mariadb
70
71
# Logging parameters
72
73
ENV ENV demo
74
ENV USERTOKEN ""
76
# Authentication/web
77
78
ENV AUTHENTICATION internal
79
ENV SSO_HEADER uid
80
ENV AJP_ENABLED true
81
ENV AJP_PORT 9090
82
ENV LOGOUT_URL https://localhost:8443/Shibboleth.sso/Logout
83
84
# Other parameters
85
86
ENV KEYSTORE_PASSWORD_FILE /run/secrets/m_keystore_password.txt
87
ENV MEM 2048m
88
ENV TIER_RELEASE=not-released-yet
89
ENV TIER_MAINTAINER=tier
90
91
# TIER Beacon Opt-out
92
# Completely uncomment the following ENV line to prevent the containers from sending analytics information to Internet2.
93
# With the default/release configuration, it will only send product (Shibb/Grouper/COmanage/midPoint) and version (3.9, etc)
94
# once daily between midnight and 4am. There is no configuration or private information collected or sent.
95
# This data helps with the scaling and funding of TIER. Please do not disable it if you find the TIER tools useful.
96
# To keep it commented, keep multiple comments on the following line (to prevent other scripts from processing it).
97
##### ENV TIER_BEACON_OPT_OUT true
98
99
# requires MP_VERSION and TIER_xyz variables so we have to execute it here
101
# JUST FOR TESTING - REMOVE BEFORE RELEASE
102
RUN rm /etc/localtime \
103
&& ln -s /usr/share/zoneinfo/US/Central /etc/localtime \
104
&& date
106
RUN /opt/tier/setenv.sh
107
108
CMD ["/usr/local/bin/startup.sh"]
You can’t perform that action at this time.