Vanilla PHP images with pgsql (PostgreSQL) added, plus a pre-built Laravel Sail image.
5.8K
IMPORTANT: These images are automatically rebuilt every month, using the latest PHP images and the latest Laravel Sail.
It has two things:
Exactly the same as https://hub.docker.com/_/php , but with the pgsql (PostgreSQL) module built in.
Laravel Sail pre-built from https://github.com/laravel/sail/ , with WWWGROUP=1000, as this covers ~98% of cases, making a local build unnecessary, and startup much faster.
You only need to edit the docker-compose.yml file that Sail has generated, like this:
version: '3'
services:
laravel.test:
#build:
# context: ./vendor/laravel/sail/runtimes/8.3
# dockerfile: Dockerfile
# args:
# WWWGROUP: '${WWWGROUP}'
#image: sail-8.3/app
image: kkovacs/php:8.3-sail
[...]
You can use it like this, for example:
cd some-laravel-project
docker run --rm -it -v $PWD:/app -p 80:80 kkovacs/php:8.3-static-php-cli artisan serve --host 0.0.0.0 --port 80
You can also solve Laravel Sail's "chicken-and-egg" problem with composer like this:
wget https://github.com/composer/composer/releases/latest/download/composer.phar
docker run --rm -it -v $PWD:/app -p 80:80 kkovacs/php:8.3-static-php-cli composer.phar
sail-swoole imageThere used to be a section here about using Laravel Sail with Swoole which had it's own kkovacs/php:8.x-sail-swoole image, but that's unnecessary anymore: just use the kkovacs/php:8.3-sail image, and the instructions from Laravel Octane on using SUPERVISOR_PHP_COMMAND.
Content type
Image
Digest
sha256:a2812bc47…
Size
178.1 MB
Last updated
27 days ago
docker pull kkovacs/php:8.3-apache-20260830