-
Notifications
You must be signed in to change notification settings - Fork 1
/
debian.fpm.Dockerfile
72 lines (67 loc) · 1.86 KB
/
debian.fpm.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
ARG PHP_VERSION=8.1
FROM tobi312/php:${PHP_VERSION}-fpm-slim
ARG PHP_VERSION
ARG DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
LABEL org.opencontainers.image.authors="Tobias Hargesheimer <[email protected]>" \
org.opencontainers.image.title="PHP+FPM" \
org.opencontainers.image.description="Debian with PHP ${PHP_VERSION} with FPM" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://hub.docker.com/r/tobi312/php" \
org.opencontainers.image.source="https://github.com/Tob1as/docker-php"
# PHP
RUN \
PHP_EXTENSIONS_LIST=" \
@composer \
apcu \
bcmath \
bz2 \
calendar \
dba \
enchant \
exif \
ffi \
# gd \
gettext \
gmp \
imagick \
imap \
intl \
ldap \
memcached \
mongodb \
mysqli \
opcache \
pdo_dblib \
pdo_mysql \
pdo_pgsql \
pgsql \
pspell \
redis \
shmop \
snmp \
tidy \
xsl \
yaml \
zip \
" \
; \
\
ARCH=`uname -m` ; \
echo "ARCH=$ARCH" ; \
if [[ "$ARCH" == "armv"* ]]; then \
# fix: /usr/lib/gcc/arm-linux-gnueabihf/10/include/arm_neon.h:10403:1: error: inlining failed in call to ‘always_inline’ ‘vld1q_u8’: target specific option mismatch
apt-get update ; \
apt-get install -y --no-install-recommends libfreetype6 libjpeg62-turbo ^libpng[0-9]+-[0-9]+$ libxpm4 ^libwebp[0-9]+$ ; \
temp_package="libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libwebp-dev" ; \
apt-get install -y --no-install-recommends $temp_package ; \
docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype ; \
docker-php-ext-install -j$(nproc) gd ; \
apt-get purge -y $temp_package ; apt-get autoremove -y ; \
rm -rf /var/lib/apt/lists/* ; \
#php -i | grep 'GD' ; \
else \
PHP_EXTENSIONS_LIST="$PHP_EXTENSIONS_LIST gd" ; \
fi ; \
install-php-extensions $PHP_EXTENSIONS_LIST ; \
php -m