forked from uzh-bf/shibboleth-sp-dockerized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 1.71 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
FROM centos:centos7
LABEL maintainer="Unicon, Inc."
COPY security:shibboleth.repo /etc/yum.repos.d/security:shibboleth.repo
RUN yum -y update \
&& yum -y install wget \
&& yum -y install httpd shibboleth-3.4.1-1 mod_ssl \
&& yum -y clean all
COPY httpd-shibd-foreground /usr/local/bin/
COPY shibboleth/ /etc/shibboleth/
RUN test -d /var/run/lock || mkdir -p /var/run/lock \
&& test -d /var/lock/subsys/ || mkdir -p /var/lock/subsys/ \
&& chmod +x /etc/shibboleth/shibd-redhat \
&& echo $'export LD_LIBRARY_PATH=/opt/shibboleth/lib64:$LD_LIBRARY_PATH\n'\
> /etc/sysconfig/shibd \
&& chmod +x /etc/sysconfig/shibd /etc/shibboleth/shibd-redhat /usr/local/bin/httpd-shibd-foreground \
&& sed -i 's/ErrorLog "logs\/error_log"/ErrorLog \/dev\/stdout/g' /etc/httpd/conf/httpd.conf \
&& echo -e "\nErrorLogFormat \"httpd-error [%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i\"" >> /etc/httpd/conf/httpd.conf \
&& sed -i 's/CustomLog "logs\/access_log" combined/CustomLog \/dev\/stdout \"httpd-combined %h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\"/g' /etc/httpd/conf/httpd.conf \
&& sed -i 's/ErrorLog logs\/ssl_error_log/ErrorLog \/dev\/stdout/g' /etc/httpd/conf.d/ssl.conf \
&& sed -i 's/<\/VirtualHost>/ErrorLogFormat \"httpd-ssl-error [%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\\ %a] %M% ,\\ referer\\ %{Referer}i\"\n<\/VirtualHost>/g' /etc/httpd/conf.d/ssl.conf \
&& sed -i 's/CustomLog logs\/ssl_request_log/CustomLog \/dev\/stdout/g' /etc/httpd/conf.d/ssl.conf \
&& sed -i 's/TransferLog logs\/ssl_access_log/TransferLog \/dev\/stdout/g' /etc/httpd/conf.d/ssl.conf
EXPOSE 80 443
CMD ["httpd-shibd-foreground"]