Minimal PHP Docker image focused on Laravel applications. It's use is intended for kool.dev, but can fit in any other PHP use-case.
The images with Nginx include
h5bp/server-configs-nginx with a hand picked set of configuration active by default. So if you want to change or add a new server configuration you can
include h5bp/... as you see fit.
All images currently ship out with Composer 2.x as the default version. If for some reason you still need to use Composer 1.x and cannot make the upgrade, we still ship a
composer1in the images PATH as well, which is latest Composer 1.x version. Feel free to use it while you prepare to move to 2.0.
The image built is
kooldev/php which has a bunch of tags available:
We can always extend these images to suit them to our current use case. For example, we have a few extensions for specific use cases:
|Changes the user id that executes the commands
|Changes the user id that executes the commands (ignored if ASUSER is provided)
|Allows composer to run with super user
|Changes composer memory limit
|Enables the Xdebug extension
|Changes timezone used by date/time functions
|Changes PHP memory limit
|Changes how many input variables may be accepted on PHP
|Changes PHP maximum size of an uploaded file
|Changes PHP max size of post data allowed
|Changes PHP maximum time is allowed to run a script
|Changes the PORT address of the FastCGI requests
|Changes the number of child processes to be used on FPM
|Changes FPM timeout to serve a single request
|Changes the PORT address
|Changes NGINX root directive
|Changes the index directive
|Changes maximum allowed size of the client request body
|Changes the address of a FastCGI server
|Changes a timeout for reading a response from the FastCGI server
|Changes the number and size of the buffers used for reading a response
|Changes the size of the buffer used for reading the first part of the response received
|Enables auto-tuning of worker processes based on available CPU cores (container instead of host), to disable set it to empty string
|Enables the HTTPS server
|Port for the HTTPS server to listen
|The path in the container for the SSL certificate file
|The path in the container for the SSL certificate key file
docker run -it --rm kooldev/php:7.4 php -v
With environment variables:
docker run -it --rm -e ENABLE_XDEBUG=true kooldev/php:7.4-prod php -v
Update images with templates
You should change
fwd-template.json for configuration and
template folder for the actual base templates.
After any changes, we need to run
kool run template to parse the templates and generate all versions folder/files.
The MIT License (MIT). Please see License File for more information.