-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
107 lines (101 loc) · 3.23 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
FROM centos:centos7
ENV LANG=en_US.UTF-8
LABEL maintainer="The University of Auckland" \
description="NZ ORCiD Hub Application Image with Development support"
# ADD http://download.opensuse.org/repositories/security://shibboleth/CentOS_7/security:shibboleth.repo /etc/yum.repos.d/shibboleth.repo
ADD https://shibboleth.net/cgi-bin/sp_repo.cgi?platform=CentOS_7 /etc/yum.repos.d/shibboleth.repo
# fix download.opensuse.org not available
##RUN sed -i 's|download|downloadcontent|g' /etc/yum.repos.d/shibboleth.repo
COPY conf/app.wsgi /var/www/html/
# prefix "ZZ" added, that it gest inluded the very end (after Shibboleth gets loaded)
COPY conf/app.conf /etc/httpd/conf.d/ZZ-app.conf
COPY requirements.txt /
# COPY setup.py /
# COPY orcid_api /orcid_api
# COPY orcid_hub /orcid_hub
COPY setup.* orcid* /
COPY run-app /usr/local/bin/
COPY ./conf /conf
# && chmod +x /etc/sysconfig/shibd /etc/shibboleth/shibd-redhat \
# RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm \
RUN yum -y install \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y update \
&& yum -y install \
shibboleth.x86_64 \
httpd \
mod_ssl \
gcc.x86_64 \
httpd-devel.x86_64 \
python36.x86_64 \
python36-devel.x86_64 \
python36-pip \
git \
&& echo $'RPMs installed...' \
&& pip3.6 install -U pip \
&& pip install -U mod_wsgi psycopg2-binary \
&& pip install -U -r requirements.txt \
&& /usr/local/bin/mod_wsgi-express module-config >/etc/httpd/conf.modules.d/10-wsgi.conf \
&& [ -d /var/run/lock ] || mkdir -p /var/run/lock \
&& [ -d /var/lock/subsys/ ] || mkdir -p /var/lock/subsys/ \
&& echo $'export LD_LIBRARY_PATH=/opt/shibboleth/lib64:$LD_LIBRARY_PATH\n' > /etc/sysconfig/shibd \
&& yum erase -y \
alsa-lib \
apr-util-devel \
copy-jdk-configs \
cpp \
cyrus-sasl-devel \
expat-devel \
fontconfig \
fontpackages-filesystem \
freetype \
gcc \
giflib \
git \
glibc-devel \
glibc-headers \
httpd-devel \
javapackages-tools \
kernel-headers \
libdb-devel \
libfontenc \
libICE \
libjpeg-turbo \
libpng \
libSM \
libX11 \
libX11-common \
libXau \
libxcb \
libXcomposite \
libXext \
libXfont \
libXi \
libXrender \
libxslt \
libXtst \
lksctp-tools \
openldap-devel \
perl \
python36-devel \
python36-pip \
python-javapackages \
python-lxml \
ttmkfdir \
xorg-x11-fonts-Type1 \
xorg-x11-font-utils \
java-1.8.0-openjdk-headless \
tzdata-java \
&& chmod +x /usr/local/bin/run-app \
&& cd /var/lib/rpm \
&& rm -rf __db* \
&& rpm --rebuilddb \
&& yum -y clean all \
&& chmod +x /etc/shibboleth/shibd-redhat \
&& rm -rf /var/cache/yum \
&& rm -rf $HOME/.pip/cache \
&& rm -rf /var/cache/*/* /anaconda-post.log \
&& rm -rf /requirements.txt /swagger_client.egg-info /setup.* /orcid_*
EXPOSE 80 443
CMD ["run-app"]