|
1 | | -## Cloned and modified from phpdocker.io's 8.3 base image. |
| 1 | +FROM phpdockerio/php:8.4-fpm |
| 2 | +WORKDIR "/app" |
2 | 3 |
|
3 | | -### CLI ### |
4 | | - |
5 | | -FROM ubuntu:noble AS cli |
6 | | - |
7 | | -# Fixes some weird terminal issues such as broken clear / CTRL+L |
8 | | -ENV TERM=linux |
9 | | - |
10 | | -# Ensure apt doesn't ask questions when installing stuff |
11 | | -ENV DEBIAN_FRONTEND=noninteractive |
12 | | - |
13 | | -# Install Ondrej repos for Ubuntu jammy, PHP, composer and selected extensions - better selection than |
14 | | -# the distro's packages |
15 | 4 | RUN apt-get update \ |
16 | | - && apt-get install -y --no-install-recommends gnupg \ |
17 | | - && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \ |
18 | | - && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ |
19 | | - && apt-get update \ |
20 | 5 | && apt-get -y --no-install-recommends install \ |
21 | | - ca-certificates \ |
22 | | - curl \ |
23 | | - unzip \ |
24 | | - php8.4-cli \ |
25 | | - php8.4-curl \ |
26 | | - php8.4-mbstring \ |
27 | | - php8.4-opcache \ |
28 | | - php8.4-readline \ |
29 | | - php8.4-xml \ |
30 | | - php8.4-pdo \ |
31 | | - php8.4-pdo-sqlite \ |
32 | | - php8.4-dev \ |
33 | | - php-pear \ |
34 | | - make \ |
35 | 6 | git \ |
36 | | - nano \ |
37 | | - && apt-get clean \ |
38 | | - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ~/.composer |
39 | | - |
40 | | -#=== Install xdebug via PIE (PHP Extension Installer) === |
41 | | -#ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ |
42 | | -#RUN install-php-extensions xdebug/xdebug@master \ |
43 | | -# && docker-php-ext-enable xdebug |
44 | | - |
45 | | -RUN pecl install xdebug-3.4.0 |
46 | | - |
47 | | -#RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \ |
48 | | -# && cd xdebug && git reset --hard 65f7f69f34 && rm -r .git |
49 | | - |
50 | | -COPY --from=composer:2 /usr/bin/composer /usr/bin/composer |
51 | | - |
52 | | -CMD ["php", "-a"] |
53 | | - |
54 | | -# Git keeps whining if I don't do this. |
55 | | -RUN git config --global --add safe.directory /app |
56 | | - |
57 | | -### FPM ### |
58 | | - |
59 | | -FROM cli AS fpm |
60 | | - |
61 | | -# Install FPM |
62 | | -RUN apt-get update \ |
63 | | - && apt-get -y --no-install-recommends install php8.4-fpm \ |
| 7 | + php8.4-xdebug \ |
64 | 8 | && apt-get clean \ |
65 | 9 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* |
66 | | - |
67 | | -STOPSIGNAL SIGQUIT |
68 | | - |
69 | | -# PHP-FPM packages need a nudge to make them docker-friendly |
70 | | -COPY overrides.conf /etc/php/8.4/fpm/pool.d/z-overrides.conf |
71 | | - |
72 | | -CMD ["/usr/sbin/php-fpm8.4", "-O" ] |
73 | | - |
74 | | -# Open up fcgi port |
75 | | -EXPOSE 9000 |
0 commit comments