Skip to content
Permalink
Newer
Older
100644 115 lines (88 sloc) 4.14 KB
2
# Building assumes midpoint-dist.tar.gz is present in the current directory.
5
FROM tier/shibboleth_sp:3.0.4_03122019
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-11 \
14
cron \
15
supervisor \
16
libcurl \
17
&& yum clean -y all
18
19
RUN rm /etc/shibboleth/sp-signing-key.pem /etc/shibboleth/sp-signing-cert.pem /etc/shibboleth/sp-encrypt-key.pem /etc/shibboleth/sp-encrypt-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/setup-timezone.sh \
33
&& chmod 755 /usr/local/bin/start-midpoint.sh \
34
&& chmod 755 /usr/local/bin/start-httpd.sh \
35
&& chmod 755 /usr/local/bin/startup.sh \
36
&& chmod 755 /usr/local/bin/healthcheck.sh
37
38
RUN cp /dev/null /etc/httpd/conf.d/ssl.conf \
39
&& mv /etc/httpd/conf.d/shib.conf /etc/httpd/conf.d/shib.conf.auth.shibboleth \
40
&& touch /etc/httpd/conf.d/shib.conf.auth.internal \
41
&& sed -i 's/LogFormat "/LogFormat "httpd;access_log;%{ENV}e;%{USERTOKEN}e;/g' /etc/httpd/conf/httpd.conf \
42
&& 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 \
43
&& sed -i 's/CustomLog "logs\/access_log"/CustomLog "\/tmp\/loghttpd"/g' /etc/httpd/conf/httpd.conf \
44
&& sed -i 's/ErrorLog "logs\/error_log"/ErrorLog "\/tmp\/loghttpd"/g' /etc/httpd/conf/httpd.conf \
45
&& echo -e "\nPassEnv ENV" >> /etc/httpd/conf/httpd.conf \
46
&& echo -e "\nPassEnv USERTOKEN" >> /etc/httpd/conf/httpd.conf
47
48
# Build arguments
49
50
ARG MP_VERSION=4.0.1
51
ARG MP_DIST_FILE=midpoint-dist.tar.gz
53
ENV MP_DIR /opt/midpoint
54
55
RUN mkdir -p ${MP_DIR}/var
57
COPY ${MP_DIST_FILE} ${MP_DIR}
58
COPY container_files/mp-dir/ ${MP_DIR}/
59
60
RUN echo 'Extracting midPoint archive...' \
61
&& tar xzf ${MP_DIR}/${MP_DIST_FILE} -C ${MP_DIR} --strip-components=1
63
# Disabled because of wider compatibility issues (e.g. AWS)
64
# TODO: consider all the consequences
65
#VOLUME ${MP_DIR}/var
66
67
# Repository parameters
68
69
ENV REPO_DATABASE_TYPE mariadb
Oct 1, 2018
70
ENV REPO_JDBC_URL default
71
ENV REPO_HOST midpoint_data
72
ENV REPO_PORT default
73
ENV REPO_DATABASE registry
74
ENV REPO_USER registry_user
75
ENV REPO_PASSWORD_FILE /run/secrets/mp_database_password.txt
76
ENV REPO_MISSING_SCHEMA_ACTION create
77
ENV REPO_UPGRADEABLE_SCHEMA_ACTION stop
78
79
# Logging parameters
80
81
ENV ENV demo
82
ENV USERTOKEN ""
84
# Authentication/web
85
86
ENV AUTHENTICATION internal
87
ENV SSO_HEADER uid
88
ENV AJP_ENABLED true
89
ENV AJP_PORT 9090
90
ENV LOGOUT_URL https://localhost:8443/Shibboleth.sso/Logout
92
# Other parameters
93
Oct 1, 2018
94
ENV MP_KEYSTORE_PASSWORD_FILE /run/secrets/mp_keystore_password.txt
95
ENV MP_MEM_MAX 2048m
96
ENV MP_MEM_INIT 1024m
97
ENV TIMEZONE UTC
98
ENV TIER_RELEASE not-released-yet
99
ENV TIER_MAINTAINER tier
101
# TIER Beacon Opt-out
102
# Completely uncomment the following ENV line to prevent the containers from sending analytics information to Internet2.
103
# With the default/release configuration, it will only send product (Shibb/Grouper/COmanage/midPoint) and version (4.0, etc)
104
# once daily between midnight and 4am. There is no configuration or private information collected or sent.
105
# This data helps with the scaling and funding of TIER. Please do not disable it if you find the TIER tools useful.
106
# To keep it commented, keep multiple comments on the following line (to prevent other scripts from processing it).
107
##### ENV TIER_BEACON_OPT_OUT true
108
109
# requires MP_VERSION and TIER_xyz variables so we have to execute it here
111
RUN /opt/tier/setenv.sh
112
113
HEALTHCHECK --interval=1m --timeout=30s --start-period=2m CMD /usr/local/bin/healthcheck.sh
114
115
CMD ["/usr/local/bin/startup.sh"]
You can’t perform that action at this time.