-
-
Notifications
You must be signed in to change notification settings - Fork 256
/
Dockerfile
88 lines (76 loc) · 2.61 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
#
# This image uses a php:8.4.1-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:8.4.1-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=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-install gd \
\
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*
#=== Install ldap PHP dependencies ===
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, opcache and zip PHP dependencies ===
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 dependencies ===
RUN set -x \
&& docker-php-ext-install pdo pdo_mysql mysqli
#=== Install pgsql dependencies ===
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/*
#=== Install xdebug PHP dependencies ===
RUN pecl install xdebug-3.4.0beta1 \
&& docker-php-ext-enable xdebug
#=== php default ===
ENV PMF_TIMEZONE="Europe/Berlin" \
PMF_ENABLE_UPLOADS=On \
PMF_MEMORY_LIMIT=2048M \
PMF_DISABLE_HTACCESS="" \
PHP_LOG_ERRORS=On \
PHP_ERROR_REPORTING=E_ALL \
PHP_POST_MAX_SIZE=64M \
PHP_UPLOAD_MAX_FILESIZE=64M
#=== Set SSL support
RUN a2enmod ssl && a2enmod rewrite
RUN mkdir -p /etc/apache2/ssl
COPY ./.docker/*.pem /etc/apache2/ssl/
COPY ./.docker/000-default.conf /etc/apache2/sites-available/000-default.conf
#=== 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" ]