This is a Dockerfile to build a debian based container image running nginx and php-fpm 8.4.x / 8.3.x / 8.2.x / 8.1.x & Composer.
| Docker Tag | GitHub Release | Nginx Version | PHP Version | Debian Version | Composer |
|---|---|---|---|---|---|
| latest | master Branch | 1.29.0 | 8.4 | bullseye | 2.8.6 |
| php84 | php84 Branch | 1.29.0 | 8.4 | bullseye | 2.8.6 |
| php83 | php83 Branch | 1.27.0 | 8.4 | bullseye | 2.7.7 |
| php82 | php82 Branch | 1.25.3 | 8.2.13 | bullseye | 2.6.6 |
| php81 | php81 Branch | 1.25.3 | 8.1.26 | bullseye | 2.6.6 |
To build from source you need to clone the git repo and run docker build:
git clone https://github.com/drnxloc/nginx-php-fpm.git
cd nginx-php-fpm
followed by
docker build -t nginx-php-fpm:php84 . # PHP 8.4.x
docker pull drnxloc/nginx-php-fpm:php84
To run the container:
sudo docker run -dp 80:80 drnxloc/nginx-php-fpm:php84
Default web root:
/usr/share/nginx/html
# Laravel Schedule
RUN crontab -l | { cat; echo "* * * * * php /var/www/laravel/artisan schedule:run >> /dev/null 2>&1"; } | crontab -