Batteries included Docker image for latest PHP 7 & 8 versions + all extensions installed and enabled, Composer, Node.js, Yarn.
To use this image, you must have Docker installed.
Inside your Dockerfile
# you can use any of 7.4, 7.4-apache, 7.4-fpm, 8.3, 8.3-apache or 8.3-fpm as image tag
# can suffix tag with -debug for an image with xdebug e.g., php-8.3-debug
FROM ghcr.io/qrstuff/phackage:7.4
# ...run, cmd & more
# you can use any of 7.4, 7.4-apache, 7.4-fpm, 8.3, 8.3-apache or 8.3-fpm as image tag
# again, can suffix tag with -debug for an image with xdebug e.g., php-8.3-debug
$ docker run -it --rm -v .:/app -w /app ghcr.io/qrstuff/phackage:7.4 composer install
$ docker run -it -p 8000:8000 --rm -v .:/app -w /app ghcr.io/qrstuff/phackage:7.4 php artisan serve
Building or modifying the container yourself from source is also quite easy. Just clone the repository and run below command:
# using latest php
$ docker build -t phackage-local .
# using custom php image version/variant
$ docker build --build-arg="baseImageTag=7.4-cli" -t phackage-local .
See the LICENSE file.