Skip to content

Commit fe53718

Browse files
authored
chore(ZMS-3237): Create Dockerfile for php 8.3
1 parent dbd5080 commit fe53718

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

php83/Dockerfile

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
ARG COMPOSER_VERSION="2"
2+
ARG PHP_VERSION="8.3-fpm-bullseye"
3+
4+
# composer version to make available in built image
5+
FROM composer:${COMPOSER_VERSION} AS composer-image
6+
7+
# php version to actually build
8+
FROM php:${PHP_VERSION} AS base
9+
10+
# bash as default shell should exit on non-zero exit-codes in piped commands
11+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
12+
13+
COPY scripts/docker-apt-clean-install /usr/local/sbin/
14+
ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
15+
16+
ENV DEBIAN_FRONTEND=noninteractive
17+
18+
# install software available by default in this image
19+
# hadolint ignore=DL3008,DL3009
20+
RUN docker-apt-clean-install \
21+
calendar \
22+
#coreutils \
23+
#debconf-utils \
24+
#gettext \
25+
git \
26+
wget \
27+
gnupg2 \
28+
#gosu \
29+
libbz2-dev \
30+
#libexif-dev \
31+
libfreetype6-dev \
32+
libjpeg62-turbo-dev \
33+
#libgif-dev \
34+
#libgmp-dev \
35+
libicu-dev \
36+
libjpeg-dev \
37+
libpng-dev \
38+
#libpq-dev \
39+
#libpspell-dev \
40+
#libtidy-dev \
41+
libwebp-dev \
42+
libxml2-dev \
43+
#libxpm-dev \
44+
#libxslt1-dev \
45+
libzip-dev \
46+
locales \
47+
msmtp \
48+
tzdata \
49+
unzip \
50+
zlib1g-dev \
51+
zip \
52+
&& echo "tzdata tzdata/Areas select Europe" | debconf-set-selections \
53+
&& echo "tzdata tzdata/Zones/Europe select Berlin" | debconf-set-selections \
54+
&& rm -f /etc/localtime /etc/timezone \
55+
&& dpkg-reconfigure -f noninteractive tzdata
56+
57+
ENV TZ=Europe/Berlin
58+
59+
# configure and install PHP extensions
60+
RUN docker-php-ext-configure calendar \
61+
&& docker-php-ext-configure gd \
62+
--with-freetype \
63+
--with-jpeg \
64+
--with-webp \
65+
&& docker-php-ext-configure intl \
66+
--enable-intl \
67+
&& docker-php-ext-install -j"$(nproc)" \
68+
bcmath \
69+
bz2 \
70+
calendar \
71+
#exif \
72+
gd \
73+
#gmp \
74+
gettext \
75+
intl \
76+
#mysqli \
77+
opcache \
78+
#pcntl \
79+
pdo_mysql \
80+
#pdo_pgsql \
81+
#pspell \
82+
soap \
83+
#sockets \
84+
#tidy \
85+
#xsl \
86+
zip \
87+
&& rm -rf /usr/src/
88+
89+
FROM base as dev
90+
91+
COPY scripts/ /usr/local/sbin/
92+
93+
# install xdebug – it is not enabled by default though, you need to add the following line to your php.ini file:
94+
# zend_extension="/usr/local/php/modules/xdebug.so"
95+
ARG XDEBUG_VERSION="xdebug"
96+
RUN pecl install ${XDEBUG_VERSION}
97+
98+
# put composer into image
99+
COPY --from=composer-image /usr/bin/composer /usr/bin/composer
100+
ENV COMPOSER_NO_INTERACTION=1
101+
ENV COMPOSER_HOME=/tmp/composer
102+
# show ext-* and lib-* entries one may use in composer.json on this platform
103+
#RUN COMPOSER_ALLOW_SUPERUSER=1 composer show --platform --no-plugins --no-interaction
104+
105+
# Add locale de_DE.UTF-8
106+
RUN echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
107+
108+
# Add current node version
109+
RUN docker-node-install node_16.x

0 commit comments

Comments
 (0)