-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from phpdocker-io/php84
PHP 8.4
- Loading branch information
Showing
5 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
############################################ | ||
# PHPDocker.io PHP 8.4 / CLI and FPM image # | ||
############################################ | ||
|
||
### CLI ### | ||
|
||
FROM ubuntu:noble AS cli | ||
|
||
# Fixes some weird terminal issues such as broken clear / CTRL+L | ||
ENV TERM=linux | ||
|
||
# Ensure apt doesn't ask questions when installing stuff | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install Ondrej repos for Ubuntu, PHP, composer and selected extensions - better selection than | ||
# the distro's packages | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends gnupg \ | ||
&& echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu noble main" > /etc/apt/sources.list.d/ondrej-php.list \ | ||
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ | ||
&& apt-get update \ | ||
&& apt-get -y --no-install-recommends install \ | ||
ca-certificates \ | ||
curl \ | ||
unzip \ | ||
php8.4-apcu \ | ||
php8.4-cli \ | ||
php8.4-curl \ | ||
php8.4-mbstring \ | ||
php8.4-opcache \ | ||
php8.4-readline \ | ||
php8.4-xml \ | ||
php8.4-zip \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ~/.composer | ||
|
||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer | ||
|
||
CMD ["php", "-a"] | ||
|
||
### FPM ### | ||
|
||
FROM cli AS fpm | ||
|
||
# Install FPM | ||
RUN apt-get update \ | ||
&& apt-get -y --no-install-recommends install php8.4-fpm \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | ||
|
||
STOPSIGNAL SIGQUIT | ||
|
||
# PHP-FPM packages need a nudge to make them docker-friendly | ||
COPY overrides.conf /etc/php/8.4/fpm/pool.d/z-overrides.conf | ||
|
||
CMD ["/usr/sbin/php-fpm8.4", "-O" ] | ||
|
||
# Open up fcgi port | ||
EXPOSE 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# PHPDocker.io - PHP 8.4 / CLI, FPM and Swoole container images | ||
|
||
Ubuntu 22.04 PHP 8.4 CLI and FPM container images for [PHPDocker.io](http://phpdocker.io) projects. Packages are provided by [Ondřej Surý](https://deb.sury.org/). | ||
|
||
Far smaller in size than PHP's official container. No need to compile any extensions: simply run `apt-get install php8.4-EXTENSION_NAME` as part of your Dockerfile | ||
|
||
*Note on logging:* configure your application to stream logs into `php://stdout`. That's it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[global] | ||
; Override default pid file | ||
pid = /run/php-fpm.pid | ||
|
||
; Avoid logs being sent to syslog | ||
error_log = /proc/self/fd/2 | ||
|
||
; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop | ||
; This helps avoiding 502's | ||
process_control_timeout = 30 | ||
|
||
; Do not daemonize (eg send process to the background) | ||
daemonize = no | ||
|
||
[www] | ||
; Access from webserver container is via network, not socket file | ||
listen = [::]:9000 | ||
|
||
; Redirect logs to stdout - FPM closes /dev/std* on startup | ||
access.log = /proc/self/fd/2 | ||
catch_workers_output = yes | ||
|
||
; Remove "pool www" decoration from log output | ||
decorate_workers_output = no | ||
|
||
; Required to allow config-by-environment | ||
clear_env = no |