-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
70 lines (50 loc) · 2.11 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM centos:centos7
# The following provides a simple way to bypass any cached image builds.
# It can also be adjusted as a simple way to add all the latest centos
# patches to the image.
#
ENV PATCH_LEVEL 20181221
MAINTAINER David King <[email protected]>
#ENV JRE_HOME /opt/jre1.8.0_60
COPY shibboleth.repo /etc/yum.repos.d/
RUN yum -y update \
&& yum -y install wget epel-release \
&& yum -y install httpd shibboleth.x86_64 dos2unix \
&& yum -y install mod_ssl \
&& rm /etc/shibboleth/sp-*.pem \
&& yum clean all
RUN mkdir /entrypoints
COPY httpd-foreground /entrypoints/
COPY entrypoints.d/ /entrypoints/entrypoints.d/
RUN mkdir -p /var/run/lock /var/lock/subsys /var/www/html/server \
&& chmod +x /etc/shibboleth/shibd-redhat /entrypoints/httpd-foreground
# These private SP credentials are baked into the image because
# they are only used for automated internal testing and limited attribute
# release. One should never do this for anything else.
#
# You can use these by adding the following environment variables to your container
# ENV SHIB_SP_KEY /etc/shibboleth/internal-test-only/sp-key.pem
# ENV SHIB_SP_CERT /etc/shibboleth/internal-test-only/sp-cert.pem
#
COPY internal-test-only/ /etc/shibboleth/internal-test-only/
COPY printenv /var/www/cgi-bin/
# These default paths are designed to fit with the default Docker secret approach - see
# docker-compose.yml for an example of mapping a volume for that location and
# docker-compose-secrets.yml for an example where the secret is referenced in the docker-compose
# format.
#
ENV SHIB_SP_KEY /run/secrets/SHIB_SP_KEY
ENV SHIB_SP_CERT /run/secrets/SHIB_SP_CERT
ENV SP_HANDLER_URL /Shibboleth.sso
ENV SP_HOME_URL /
# Apache Config:
EXPOSE 80
EXPOSE 443
COPY httpd.conf /etc/httpd/conf/httpd.conf
COPY conf.d/ /etc/httpd/conf.d/
# Set Time Zone:
RUN rm /etc/localtime && ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
COPY healthcheck /var/www/html/server/healthcheck
ADD shibboleth-sp/ /etc/shibboleth/
RUN chmod +x /var/www/cgi-bin/* && dos2unix /entrypoints/httpd-foreground /var/www/cgi-bin/printenv
ENTRYPOINT ["/entrypoints/httpd-foreground"]