forked from peterm95018/docker-shibboleth
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
115 lines (93 loc) · 3.41 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
108
109
110
111
112
113
114
115
FROM debian:jessie
######################################
### Use Debian archive ###
######################################
RUN echo "deb [trusted=yes] http://archive.debian.org/debian/ jessie main contrib non-free" > /etc/apt/sources.list && \
echo 'deb [trusted=yes] http://archive.debian.org/debian-security/ jessie/updates main contrib non-free' >> /etc/apt/sources.list
######################################
### Install APACHE2 AND SHIBBOLETH ###
######################################
RUN apt-get update && apt-get upgrade -y \
&& apt-get -y --force-yes install apache2 libapache2-mod-shib2 \
&& apt-get clean \
&& a2enmod ssl proxy rewrite proxy_http proxy_fcgi
# Automatically update date for shibboleth
RUN apt-get install -y --force-yes ntp ntpdate && \
sed -i 's/debian.pool.ntp.org/fr.pool.ntp.org/g' /etc/ntp.conf && \
# ntpdate -s fr.pool.ntp.org && \
update-rc.d ntp enable && \
/etc/init.d/ntp start
# dpkg-reconfigure tzdata -> Europe -> Paris
####################
### Install PHP5 ###
####################
RUN apt-get update && \
apt-get install -y --force-yes \
php5-common \
php5-cli \
php5-curl \
php5-intl \
php5-mysql \
php5-dev \
php-apc \
libapache2-mod-php5 \
&& php5enmod curl \
&& apt-get clean
COPY --from=composer:2.2 /usr/bin/composer /usr/bin/composer
##########################
### Install Javascript ###
##########################
RUN apt-get install -y --force-yes apt-transport-https lsb-release > /dev/null 2>&1 \
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y --force-yes nodejs git \
&& apt-get clean \
&& npm install -g n \
&& n 6.8.0 \
&& npm install gulp yarn bower -g
##########################
### PUBLIPOSTAGE UTILS ###
##########################
# Install unoconv 0.7
RUN apt-get install -y --force-yes --no-install-recommends unoconv
# Install libreoffice
RUN apt-get install -y --force-yes --no-install-recommends \
libreoffice \
libreoffice-writer
# Install pdftk
RUN apt-get install -y --force-yes --no-install-recommends pdftk
# Install locales
RUN apt-get install --force-yes -y locales
# dpkg-reconfigure locales -> fr_FR.UTF-8
RUN apt-get clean
RUN chown www-data. /var/www
RUN chown www-data. /var/www/html -R
######################
### Install XDEBUG ###
######################
# RUN apt-get update \
# && apt-get install -y \
# gcc \
# make \
# autoconf \
# libc-dev \
# pkg-config
# RUN rm /etc/alternatives/php \
# && ln -s /usr/bin/php5 /etc/alternatives/php
# RUN rm /etc/alternatives/phpize \
# && ln -s /usr/bin/phpize5 /etc/alternatives/phpize
# RUN pecl install xdebug-2.5.5
# COPY xdebug.ini /etc/php5/mods-available/
# RUN echo "zend_extension=$(find /usr/lib/php5/ -name xdebug.so)" >> /etc/php5/mods-available/xdebug.ini
# COPY xdebug.ini /etc/php5/apache2/conf.d/
# COPY xdebug.ini /etc/php5/cli/conf.d/
# RUN echo "zend_extension=$(find /usr/lib/php5/ -name xdebug.so)" >> /etc/php5/apache2/conf.d/xdebug.ini \
# && echo "zend_extension=$(find /usr/lib/php5/ -name xdebug.so)" >> /etc/php5/cli/conf.d/xdebug.ini
###################
### START SHIBD ###
###################
COPY httpd-foreground /usr/local/bin/
CMD ["httpd-foreground"]
RUN echo "Listen 80\r\nListen 82\r\nListen 443\r\n" > /etc/apache2/ports.conf
WORKDIR /var/www/sygefor
EXPOSE 80 82 443
# 9000