-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile-php7
More file actions
108 lines (103 loc) · 3.65 KB
/
Dockerfile-php7
File metadata and controls
108 lines (103 loc) · 3.65 KB
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
## tecnodesign/studio:php7-v1.1
#
# docker build -f Dockerfile-php7 . -t tecnodesign/studio:php7-v1.1
# docker push tecnodesign/studio:php7-v1.1
FROM php:7-fpm
RUN apt-get update && apt-get install -y \
git \
gnupg \
libasound-dev \
libatk-bridge2.0-dev \
libatk1.0-0 \
libcairo-dev \
libcups2 \
libdrm-dev \
libfreetype6-dev \
libgbm-dev \
libjpeg-dev \
libldap2-dev \
libnss3 \
libonig-dev \
libpango-1.0 \
libpng-dev \
libwebp-dev \
libxcomposite-dev \
libxdamage-dev \
libxkbcommon-dev \
libxml2-dev \
libxrandr-dev \
libxshmfence-dev \
libzip-dev \
zlib1g-dev \
zip
RUN docker-php-ext-configure gd \
--enable-gd \
--with-freetype \
--with-jpeg \
--with-webp
RUN docker-php-ext-configure ldap \
--with-libdir=lib/x86_64-linux-gnu/
RUN docker-php-ext-install \
ctype \
dom \
fileinfo \
gd \
ldap \
mbstring \
pdo \
pdo_mysql \
simplexml \
soap \
zip
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
RUN sed -e 's/expose_php = On/expose_php = Off/' \
-e 's/max_execution_time = 30/max_execution_time = 10/' \
-e 's/max_input_time = 60/max_input_time = 5/' \
-e '/catch_workers_output/s/^;//' \
-e 's/^error_log.*/error_log = \/dev\/stderr/' \
-e 's/^;error_log.*/error_log = \/dev\/stderr/' \
-e 's/^memory_limit.*/memory_limit = 16M/' \
-e 's/post_max_size = 8M/post_max_size = 4M/' \
-e 's/;default_charset = "UTF-8"/default_charset = "UTF-8"/' \
-e 's/;max_input_vars = 1000/max_input_vars = 10000/' \
-e 's/;date.timezone =/date.timezone = UTC/' \
-i /usr/local/etc/php/php.ini
RUN echo 'max_input_vars = 10000' > /usr/local/etc/php/conf.d/x-config.ini
RUN sed -e 's/^listen = .*/listen = 9000/' \
-e 's/^listen\.allowed_clients/;listen.allowed_clients/' \
-e 's/^user = apache/user = www-data/' \
-e 's/;catch_workers_output.*/catch_workers_output = yes/' \
-e 's/^group = apache/group = www-data/' \
-e 's/^php_admin_value\[error_log\]/;php_admin_value[error_log]/' \
-e 's/^;?php_admin_value[memory_limit] = .*/php_admin_value[memory_limit] = 32M/' \
-i /usr/local/etc/php-fpm.d/www.conf
RUN sed -e 's/^error_log.*/error_log = \/dev\/stderr/' \
-i /usr/local/etc/php-fpm.conf
COPY --from=node:lts /usr/local/bin/node /usr/local/bin/node
COPY --from=node:lts /usr/local/lib/node_modules /usr/local/lib/node_modules
RUN ln -s ../lib/node_modules/asar/bin/asar.js /usr/local/bin/asar && \
ln -s ../lib/node_modules/node-gyp/bin/node-gyp.js /usr/local/bin/node-gyp && \
ln -s ../lib/node_modules/nopt/bin/nopt.js /usr/local/bin/nopt && \
ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx && \
ln -s ../lib/node_modules/semver/bin/semver.js /usr/local/bin/semver && \
ln -s ../lib/node_modules/yarn/bin/yarn.js /usr/local/bin/yarn && \
ln -s ../lib/node_modules/yarn/bin/yarn.js /usr/local/bin/yarnpkg
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
## foxy compatibility issues with composer 2.1 (open)
RUN composer self-update 2.0.14
## nodejs and puppeteer support
RUN mkdir -p \
/var/www/app \
/var/www/.cache \
/var/www/.composer \
/var/www/.npm && \
chown www-data:www-data \
/var/www/app \
/var/www/.cache \
/var/www/.composer \
/var/www/.npm
USER www-data
WORKDIR /var/www
#COPY . /var/www/app
#RUN composer install --no-dev