forked from DiouxX/docker-glpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
75 lines (64 loc) · 2.19 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
#On choisit une debian
FROM debian:buster-slim
#MAINTAINER Netman "[email protected]"
#Ne pas poser de question à l'installation
ENV DEBIAN_FRONTEND noninteractive
# Install apache2, php7 and modules
RUN set -eux; \
#\
#savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y \
apache2 \
php \
php-mysql \
php-ldap \
php-xmlrpc \
php-imap \
php-curl \
php-gd \
php-mbstring \
php-xml \
php-apcu-bc \
php-cas \
php-json \
php-iconv \
php-xmlrpc \
curl \
cron \
wget \
jq \
supervisor \
; \
# apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
\
rm -r /var/lib/apt/lists/*; \
# smoke test \
apache2 -v ;\
# get latest GLPI
curl -s https://api.github.com/repos/glpi-project/glpi/releases/latest \
| grep "browser_download_url.*tgz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi - ; \
# " \
tar -xzf *.tgz -C /var/www/html/ ;\
rm -Rf *.tgz; \
chown -R www-data:www-data /var/www/html/glpi; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
#Modification du vhost par défaut
#RUN echo "<VirtualHost *:80>\n\tDocumentRoot /var/www/html/glpi\n\n\t<Directory /var/www/html/glpi>\n\t\tAllowOverride All\n\t\tOrder Allow,Deny\n\t\tAllow from all\n\t</Directory>\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n</VirtualHost>" > /etc/apache2/sites-available/000-default.conf && \
# echo "*/2 * * * * www-data /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" >> /etc/cron.d/glpi && \
# echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.3/apache2/conf.d/timezone.ini; && \
# a2enmod rewrite && service apache2 restart && service apache2 stop
#Exposition des ports
EXPOSE 80 443
#ADD glpi.cron /etc/cron.d/glpi
#ADD glpi.http /etc/apache2/sites-available/000-default.conf
ADD supervisor /etc/supervisor
ENTRYPOINT ["supervisord"]
CMD ["-c", "/etc/supervisor/supervisord.conf"]
# ENTRYPOINT ["/usr/sbin/apache2ctl","-D","FOREGROUND"]