-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
61 lines (45 loc) · 1.76 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
FROM centos:7
MAINTAINER APEL Administrator <[email protected]>
# Add EPEL repo so we can get pip
RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
# Add IGTF trust repo, so it can be installed
RUN touch /etc/yum.repos.d/EGI-trustanchors.repo
RUN echo -e $'# EGI Software Repository - REPO META (releaseId,repositoryId,repofileId) - (10824,-,2000)\n\
[EGI-trustanchors]\n\
name=EGI-trustanchors\n\
baseurl=http://repository.egi.eu/sw/production/cas/1/current/\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=http://repository.egi.eu/sw/production/cas/1/GPG-KEY-EUGridPMA-RPM-3' >> /etc/yum.repos.d/EGI-trustanchors.repo
# Install python tools
# Install mysql
# Install apache
# Install cron
# Install at (for scheduling the IGTF update after start up)
# Install IGTF trust bundle
# Install fetch-crl
RUN yum -y install python-pip python-devel mysql mysql-devel gcc httpd httpd-devel mod_wsgi mod_ssl cronie at ca-policy-egi-core fetch-crl
# Copy APEL REST files to apache root
COPY . /var/www/html/
# Set the work diirectory to /var/www/html
WORKDIR /var/www/html
# Install APEL REST requirements
RUN pip install -r requirements.txt
# Copy APEL REST conf files to apache conf
RUN cp conf/apel_rest_api.conf /etc/httpd/conf.d/apel_rest_api.conf
# Copy SSL conf files to apache conf
RUN cp conf/ssl.conf /etc/httpd/conf.d/ssl.conf
# Make a directory for the certificates
RUN mkdir /etc/httpd/ssl/
# Make apel config dir for db configs
RUN mkdir /etc/apel
# Make cloud spool dir
RUN mkdir -p /var/spool/apel/cloud/
# Make cloud spool dir owned by apache
RUN chown apache -R /var/spool/apel/cloud/
# Generate static files
RUN echo "yes" | python manage.py collectstatic
# Expose apache and SSL ports
EXPOSE 80
EXPOSE 443
ENTRYPOINT docker/run_on_entry.sh