forked from thorsten/phpMyFAQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
77 lines (68 loc) · 2.3 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
#
# This image uses a php:7.3-apache base image and do not have any phpMyFAQ code with it.
# It's for development only, it's meant to be run with docker-compose
#
#####################################
#=== Unique stage without payload ===
#####################################
FROM php:7.3-apache
#=== Install gd php dependencie ===
RUN set -x \
&& buildDeps="libpng-dev libjpeg-dev libfreetype6-dev" \
&& apt-get update && apt-get install -y ${buildDeps} --no-install-recommends \
\
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
\
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*
#=== Install ldap php dependencie ===
RUN set -x \
&& buildDeps="libldap2-dev" \
&& apt-get update && apt-get install -y ${buildDeps} --no-install-recommends \
\
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
\
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*
#=== Install intl, soap opcache, and zip php dependencie ===
RUN set -x \
&& buildDeps="libicu-dev zlib1g-dev libxml2-dev libzip-dev" \
&& apt-get update && apt-get install -y ${buildDeps} --no-install-recommends \
\
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& docker-php-ext-install zip \
&& docker-php-ext-install opcache \
\
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*
#=== Install mysqli php dependencie ===
RUN set -x \
&& docker-php-ext-install mysqli
#=== Install pgsql dependencie ===
RUN set -ex \
&& buildDeps="libpq-dev" \
&& apt-get update && apt-get install -y $buildDeps \
\
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
\
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*
#=== php default ===
ENV PMF_TIMEZONE="Europe/Berlin" \
PMF_ENABLE_UPLOADS=On \
PMF_MEMORY_LIMIT=64M \
PMF_DISABLE_HTACCESS="" \
PHP_LOG_ERRORS=On \
PHP_ERROR_REPORTING=E_ALL|E_STRICT \
PHP_POST_MAX_SIZE=64M \
PHP_UPLOAD_MAX_FILESIZE=64M
#=== Set custom entrypoint ===
COPY docker-entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
ENTRYPOINT [ "/entrypoint" ]
#=== Re-Set CMD as we changed the default entrypoint ===
CMD [ "apache2-foreground" ]