{"id":21542400,"url":"https://github.com/kool-dev/docker-php","last_synced_at":"2025-04-13T08:21:35.679Z","repository":{"id":40469147,"uuid":"277914046","full_name":"kool-dev/docker-php","owner":"kool-dev","description":"Docker Images for PHP","archived":false,"fork":false,"pushed_at":"2024-12-27T18:54:08.000Z","size":281,"stargazers_count":41,"open_issues_count":4,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T00:11:07.352Z","etag":null,"topics":["docker","hacktoberfest","kool","kool-dev","kooldev","laravel","php","symfony"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/kooldev/php","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kool-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-07T20:20:41.000Z","updated_at":"2024-12-28T16:57:27.000Z","dependencies_parsed_at":"2025-01-02T16:12:00.058Z","dependency_job_id":"ad610e98-6b15-41de-9455-d82fd7a122c1","html_url":"https://github.com/kool-dev/docker-php","commit_stats":{"total_commits":148,"total_committers":9,"mean_commits":"16.444444444444443","dds":0.6418918918918919,"last_synced_commit":"126e55c00857a5985ba080329f0483757d601c03"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kool-dev%2Fdocker-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kool-dev%2Fdocker-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kool-dev%2Fdocker-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kool-dev%2Fdocker-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kool-dev","download_url":"https://codeload.github.com/kool-dev/docker-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681610,"owners_count":21144716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","hacktoberfest","kool","kool-dev","kooldev","laravel","php","symfony"],"created_at":"2024-11-24T05:09:29.243Z","updated_at":"2025-04-13T08:21:35.643Z","avatar_url":"https://github.com/kool-dev.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI/CD](https://github.com/kool-dev/docker-php/workflows/CI/CD/badge.svg)\n\n## Description\n\nMinimal PHP Docker image focused on Laravel applications. It's use is intended for [kool.dev](https://github.com/kool-dev/kool), but can fit in any other PHP use-case.\n\nThe images with Nginx include [`h5bp/server-configs-nginx`](https://github.com/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.\n\n### Usage\n\nSimplest example:\n\n[![asciicast](https://asciinema.org/a/388121.svg)](https://asciinema.org/a/388121)\n\n##### About `composer`\n\n\u003e 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 `composer1` in 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.\n\n## Available Tags\n\nThe image built is [`kooldev/php`](https://hub.docker.com/r/kooldev/php/tags?page=1\u0026ordering=last_updated) which has a bunch of tags available:\n\n### 8.4\n\n- [8.4](https://github.com/kool-dev/docker-php/blob/master/8.4/Dockerfile) and [8.4-prod](https://github.com/kool-dev/docker-php/blob/master/8.4-prod/Dockerfile)\n- [8.4-nginx](https://github.com/kool-dev/docker-php/blob/master/8.4-nginx/Dockerfile) and [8.4-nginx-prod](https://github.com/kool-dev/docker-php/blob/master/8.4-nginx-prod/Dockerfile)\n\n### 8.3\n\n- [8.3](https://github.com/kool-dev/docker-php/blob/master/8.3/Dockerfile) and [8.3-prod](https://github.com/kool-dev/docker-php/blob/master/8.3-prod/Dockerfile)\n- [8.3-nginx](https://github.com/kool-dev/docker-php/blob/master/8.3-nginx/Dockerfile) and [8.3-nginx-prod](https://github.com/kool-dev/docker-php/blob/master/8.3-nginx-prod/Dockerfile)\n\n### 8.2\n\n- [8.2](https://github.com/kool-dev/docker-php/blob/master/8.2/Dockerfile) and [8.2-prod](https://github.com/kool-dev/docker-php/blob/master/8.2-prod/Dockerfile)\n- [8.2-nginx](https://github.com/kool-dev/docker-php/blob/master/8.2-nginx/Dockerfile) and [8.2-nginx-prod](https://github.com/kool-dev/docker-php/blob/master/8.2-nginx-prod/Dockerfile)\n\n### 8.1\n\n- [8.1](https://github.com/kool-dev/docker-php/blob/master/8.1/Dockerfile) and [8.1-prod](https://github.com/kool-dev/docker-php/blob/master/8.1-prod/Dockerfile)\n- [8.1-nginx](https://github.com/kool-dev/docker-php/blob/master/8.1-nginx/Dockerfile) and [8.1-nginx-prod](https://github.com/kool-dev/docker-php/blob/master/8.1-nginx-prod/Dockerfile)\n\n### Legacy versions\n\n- [8.0](https://github.com/kool-dev/docker-php/blob/master/8.0/Dockerfile), [8.0-prod](https://github.com/kool-dev/docker-php/blob/master/8.0-prod/Dockerfile), [8.0-nginx](https://github.com/kool-dev/docker-php/blob/master/8.0-nginx/Dockerfile), [8.0-nginx-prod](https://github.com/kool-dev/docker-php/blob/master/8.0-nginx-prod/Dockerfile)\n- [7.4](https://github.com/kool-dev/docker-php/blob/master/7.4/Dockerfile), [7.4-prod](https://github.com/kool-dev/docker-php/blob/master/7.4-prod/Dockerfile), [7.4-nginx](https://github.com/kool-dev/docker-php/blob/master/7.4-nginx/Dockerfile), [7.4-nginx-prod](https://github.com/kool-dev/docker-php/blob/master/7.4-nginx-prod/Dockerfile).\n\n## More flavours\n\nWe can always extend these images to suit them to our current use case. For example, we have a few extensions for specific use cases:\n\n- [Oracle OCI8 database](https://github.com/kool-dev/docker-php-oci8)\n- [MS SQL Server `sqlsrv` database](https://github.com/kool-dev/docker-php-sqlsrv)\n- [Swoole](https://github.com/kool-dev/docker-php-swoole)\n\n## Environment Variables\n\nVariable | Default Value | Description\n--- | --- | ---\n**ASUSER** | `0` | Changes the user id that executes the commands\n**UID** | `0` | Changes the user id that executes the commands **(ignored if ASUSER is provided)**\n**COMPOSER_ALLOW_SUPERUSER** | `1` | Allows composer to run with super user\n**COMPOSER_MEMORY_LIMIT** | `-1` | Changes composer memory limit\n**ENABLE_XDEBUG** | `false` | Enables the Xdebug extension\n**PHP_DATE_TIMEZONE** | `UTC` | Changes timezone used by date/time functions\n**PHP_MEMORY_LIMIT** | `256M` | Changes PHP memory limit\n**PHP_MAX_INPUT_VARS** | `1000`  | Changes how many input variables may be accepted on PHP\n**PHP_UPLOAD_MAX_FILESIZE** | `25M` | Changes PHP maximum size of an uploaded file\n**PHP_POST_MAX_SIZE** | `25M` | Changes PHP max size of post data allowed\n**PHP_MAX_EXECUTION_TIME** | `30` | Changes PHP maximum time is allowed to run a script\n**PHP_FPM_LISTEN** | `9000` | Changes the PORT address of the FastCGI requests\n**PHP_FPM_MAX_CHILDREN** | `10` | Changes the number of child processes to be used on FPM\n**PHP_FPM_REQUEST_TERMINATE_TIMEOUT** | `60` | Changes FPM timeout to serve a single request\n\n### NGINX\n\nVariable | Default Value | Description\n--- | --- | ---\n**NGINX_LISTEN** | `80` | Changes the PORT address\n**NGINX_ROOT** | `/app/public` | Changes NGINX root directive\n**NGINX_INDEX** | `index.php` | Changes the index directive\n**NGINX_CLIENT_MAX_BODY_SIZE** | `25M` | Changes maximum allowed size of the client request body\n**NGINX_PHP_FPM** | `unix:/run/php-fpm.sock` | Changes the address of a FastCGI server\n**NGINX_FASTCGI_READ_TIMEOUT** | `60s` | Changes a timeout for reading a response from the FastCGI server\n**NGINX_FASTCGI_BUFFERS** | `8 8k` | Changes the number and size of the buffers used for reading a response\n**NGINX_FASTCGI_BUFFER_SIZE** | `16k` | Changes the size of the buffer used for reading the first part of the response received\n**NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE** | `true` | Enables auto-tuning of worker processes based on available CPU cores (container instead of host), to disable set it to empty string\n**NGINX_HTTPS** | `false` | Enables the HTTPS server\n**NGINX_LISTEN_HTTPS** | `443` | Port for the HTTPS server to listen\n**NGINX_HTTPS_CERT** | `/kool/ssl/_.localhost.pem` | The path in the container for the SSL certificate file\n**NGINX_HTTPS_CERT_KEY** | `/kool/ssl/_.localhost.key` | The path in the container for the SSL certificate key file\n\n## Usage\n\nWith `docker run`:\n\n```sh\ndocker run -it --rm kooldev/php:7.4 php -v\n```\n\nWith environment variables:\n\n```sh\ndocker run -it --rm -e ENABLE_XDEBUG=true kooldev/php:7.4-prod php -v\n```\n\nWith `docker-compose.yml`:\n\n```yaml\napp:\n  image: kooldev/php:8.2\n  ports:\n    - \"9773:9773\"\n  volumes:\n    - \".:/app:cached\"\n    - \"$HOME/.ssh/id_rsa:/home/developer/.ssh/id_rsa:cached\"\n  environment:\n    ASUSER: \"${$UID}\"\n```\n\n## Contributing\n\n### Update images with templates\n\nYou should change `fwd-template.json` for configuration and `template` folder for the actual base templates.\n\nAfter any changes, we need to run `kool run template` to parse the templates and generate all versions folder/files.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkool-dev%2Fdocker-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkool-dev%2Fdocker-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkool-dev%2Fdocker-php/lists"}