-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.php-8.1
48 lines (43 loc) · 1.35 KB
/
Dockerfile.php-8.1
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
FROM debian:12-slim
WORKDIR /app/
EXPOSE 9000
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
RUN apt-get update -y && apt-get -y install apt-transport-https curl locales unzip git && \
curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" > /etc/apt/sources.list.d/php.list'
RUN apt-get -y update && \
apt-get -y install locales php8.1 \
php8.1-bcmath \
php8.1-cli \
php8.1-common \
php8.1-curl \
php8.1-dom \
php8.1-gd \
php8.1-intl \
php8.1-mbstring \
php8.1-mysql \
php8.1-pgsql \
php8.1-soap \
php8.1-xml \
php8.1-zip \
php8.1-redis \
php8.1-fpm
RUN sed -i 's/^# *\(\(ru_RU\|en_US\).UTF-8\)/\1/' /etc/locale.gen && locale-gen && update-locale
RUN sed -i 's/^listen = .\+/listen = 9000/g' /etc/php/8.1/fpm/pool.d/www.conf
RUN apt-get clean && \
apt-get autoremove --purge && \
rm -rf \
/var/lib/apt/lists/* \
/usr/share/doc/* \
/usr/share/man/* \
/usr/share/info/* \
/usr/share/lintian/* \
/usr/share/locale/* \
/usr/lib/systemd/* \
/var/log/alternatives.log \
/var/log/bootstrap.log \
/var/log/dpkg.log \
/var/log/apt/* \
/tmp/*
#CMD ["php-fpm8.1", "-F"]
CMD ["php", "-a"]