-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
44 lines (39 loc) · 1.34 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
FROM php:8.1-cli-buster
LABEL org.opencontainers.image.description="PHP Extended cli image for Silverstripe applications"
LABEL org.opencontainers.image.authors="Brett Tasker '<[email protected]>'"
LABEL org.opencontainers.image.url="https://github.com/brettt89/silverstripe-docker"
LABEL org.opencontainers.image.licenses='MIT'
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions
# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp \
opcache
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN set -eux; \
docker-php-ext-enable opcache; \
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
} > "$PHP_INI_DIR/conf.d/opcache-recommended.ini"
# Set error handling
RUN echo 'date.timezone = Pacific/Auckland' > "$PHP_INI_DIR/conf.d/timezone.ini" && \
{ \
echo 'log_errors = On'; \
echo 'error_log = /dev/stderr'; \
} > "$PHP_INI_DIR/conf.d/errors.ini"