-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
63 lines (51 loc) · 2.07 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
FROM debian:bullseye
ENV DEBIAN_FRONTEND noninteractive
ARG PHP_VERSION_MOLECULE=7.4
ARG PHP_VERSION=php${PHP_VERSION_MOLECULE}
ARG PHP_DIR=php/${PHP_VERSION_MOLECULE}
RUN \
apt-get -y update ; \
apt-get -y install \
gnupg2 \
nano \
wget \
unzip \
mariadb-server \
nginx \
ssl-cert \
php-pear \
${PHP_VERSION}-fpm \
${PHP_VERSION}-mysql \
${PHP_VERSION}-cgi \
${PHP_VERSION}-mbstring \
${PHP_VERSION}-gd \
${PHP_VERSION}-xsl \
${PHP_VERSION}-curl \
${PHP_VERSION}-intl \
${PHP_VERSION}-soap \
${PHP_VERSION}-zip \
${PHP_VERSION}-bz2 \
${PHP_VERSION}-sqlite3 \
${PHP_VERSION}-xml \
${PHP_VERSION}-xmlrpc
ADD default /etc/nginx/sites-available/
RUN \
sed -i s/'max_execution_time = 30'/'max_execution_time = 3600'/ /etc/${PHP_DIR}/fpm/php.ini ; \
sed -i s/'upload_max_filesize = 2M'/'upload_max_filesize = 1G'/ /etc/${PHP_DIR}/fpm/php.ini ; \
sed -i s/'memory_limit = 128M'/'memory_limit = 256M'/ /etc/${PHP_DIR}/fpm/php.ini ; \
sed -i s/'post_max_size = 8M'/'post_max_size = 1G'/ /etc/${PHP_DIR}/fpm/php.ini ; \
sed -i s/';date.timezone ='/'date.timezone = Europe\/Paris'/ /etc/${PHP_DIR}/fpm/php.ini ; \
sed -i s/';max_input_vars = 1000'/'max_input_vars = 100000'/ /etc/${PHP_DIR}/fpm/php.ini ; \
sed -i s/'max_allowed_packet\t= 16M'/'max_allowed_packet\t= 1G'/ /etc/mysql/my.cnf ; \
sed -i s/'index.nginx-debian.html'/'index.php'/ /etc/nginx/sites-available/default ; \
sed -i s/'server_name _;'/"server_name _;\n\n\tlocation ~ \\.php$ {\n\t\tinclude snippets\/fastcgi-php.conf;\n\t\tfastcgi_pass unix:\/var\/run\/php\/php${PHP_VERSION_MOLECULE}-fpm.sock;\n\t}"/ /etc/nginx/sites-available/default
ADD index.html /var/www/html/
WORKDIR /var/www/html
RUN wget \
https://forge.sigb.net/attachments/download/4131/pmb7.4.7.zip \
; \
unzip pmb7*.zip ; rm pmb7*.zip ; chown -R www-data:www-data .
ADD entrypoint.sh /usr/local/bin/
EXPOSE 80
VOLUME ["/var/lib/mysql","/etc/pmb"]
CMD ["bash", "/usr/local/bin/entrypoint.sh"]