{"id":19693590,"url":"https://github.com/ezsystems/docker-php","last_synced_at":"2025-06-15T00:33:01.512Z","repository":{"id":43712467,"uuid":"49953951","full_name":"ezsystems/docker-php","owner":"ezsystems","description":"Contains php docker image example for use with eZ Platform (and implicit eZ Platform EE \u0026 Symfony)","archived":false,"fork":false,"pushed_at":"2023-12-12T15:13:32.000Z","size":192,"stargazers_count":45,"open_issues_count":1,"forks_count":45,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-02-27T12:02:40.006Z","etag":null,"topics":["docker-images"],"latest_commit_sha":null,"homepage":"","language":"Roff","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezsystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-01-19T13:20:42.000Z","updated_at":"2024-11-29T12:55:27.000Z","dependencies_parsed_at":"2022-07-09T07:01:11.906Z","dependency_job_id":"da59aa1a-f803-42bd-9195-cb55d55af889","html_url":"https://github.com/ezsystems/docker-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ezsystems/docker-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fdocker-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fdocker-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fdocker-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fdocker-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezsystems","download_url":"https://codeload.github.com/ezsystems/docker-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fdocker-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259905299,"owners_count":22929915,"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-images"],"created_at":"2024-11-11T19:17:19.236Z","updated_at":"2025-06-15T00:33:01.469Z","avatar_url":"https://github.com/ezsystems.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of PHP Docker image for use with eZ Platform\n\n\u003e **Example/Internal**: Instructions and Tools in this repository is provided as an example, which you can take and customize to your needs if you want to. This is something we use activly internally for QA and Demo use, and thus might change without notice _(we version the images, but only latests version receives updates)_.\n\u003e\n\u003e If you are looking to have a ready made Docker environment for local development see [eZ Launchpad](https://ezsystems.github.io/launchpad/) which is supported/provided by the comunity.\n\u003e\n\u003e If you are looking for ready made, optimized, development and production hosted environment see [eZ Platform Cloud](https://ez.no/Blog/We-Are-Launching-eZ-Platform-Cloud-Speeding-Up-Development-of-Your-Projects)\n\n\nThis Git repository contains source code for eZ Systems provided Docker PHP images [available on Docker Hub](https://hub.docker.com/r/ezsystems/php/).\n\nThe Docker images here extends [official PHP images](https://hub.docker.com/_/php/) and includes php-cli, php-fpm, [composer](https://getcomposer.org/), [blackfire](https://blackfire.io/), tweaks and extensions for optimal use with any advance Symfony applications *(like eZ Platform and eZ Platform EE)*.\n\n_NOTE: The images here, just like the official once they extend, are meant to follow Dockers 1 main process per container recommendation from Docker, adding additional services to the image is not recommended and probably won't work. If so start from scratch with something else instead of using this._\n\n\n## Overview\n\nPHP image that aims to technically support running:\n- eZ Platform/Platform Enterprise *(1.13.4 or higher)*\n- Symfony *(As in any symfony-standard like app that have same or less requirements then eZ Platform)*\n\nThe v1 format images are meant for eZ Platform v1, for images that can be used with eZ Platform v2 and v3 look at the v2 format.\n\n## Images\n\nThis repository contains several images for different versions of PHP\\*:\n- Extends `php:x.y-fpm` _(uses `debian:stretch-slim` unless otherwise noted)_:\n    - [7.4](php/Dockerfile-7.4) *(uses `debian:buster-slim`)*\n    - [7.3](php/Dockerfile-7.3)\n    - [7.2](php/Dockerfile-7.2) *(Security fixes only)*\n    - [7.1](php/Dockerfile-7.1) *(End of life December 2019, move to newer or use LTS packages from a Linux distro instead)*\n    - [7.0](php/Dockerfile-7.0) *(End of life January 2019, move to newer or use LTS packages from a Linux distro instead)*\n    - [5.6](php/Dockerfile-5.6) *(End of life December 2018, move to newer or use LTS packages from a Linux distro instead)*\n\n_Recommended version for testing newest versions of eZ Platform is PHP 7.3 or 7.4 for best performance._\n\n\\* *Primarily: Since this is also used to run functional testing against several PHP versions, for any other usage use the recommended image.*\n\n## Node image\n\nFor each php version there is an additional `-node` flavour with Node.js (Node 10 LTS) and Yarn installed, useful if your project needs it (for example for Webpack Encore).\n\n### Dev image\n\nFor each php version there is an additional `-dev` flavour based on Node image, with additional tools for when you need to be able to login and work towards the installation. It contains tools like vim, git, xdebug, ... [and others](php/Dockerfile-dev).\n\nTip: To customize Xdebug configuration you can use `XDEBUG_CONFIG` environment variable, check *Using an environment* variable section in [Xdebug](https://xdebug.org/docs/remote) documentation.\n\n### Format version\n\nTo be able to improve the image in the future, we have added a format version number that we will increase on future changes *(for instance move to Alpine Linux)*.\n\nIt is recommended to specify a tag with this format version number in your Docker / docker-compose use to avoid breaks in your application.\n\n\n## Usage\n\nThis image has been made so it can be used directly for development and built with your application for production use, this\nallows you to use the same image across all whole DevOps life cycle *(dev, build, testing, staging and production)*.\n\nBefore you start, you can test the image to see if you get which php version it is running:\n```bash\ndocker run --rm ezsystems/php:7.2 php -v\n```\n\nThis should result in *something* like:\n```\nPHP 7.2.8 (cli) (built: Jul 21 2018 07:56:11) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\n    with Zend OPcache v7.2.8, Copyright (c) 1999-2018, by Zend Technologies\n    with blackfire v1.22.0~linux-x64-non_zts72, https://blackfire.io, by Blackfire\n```\n\n### Production use\n\nIn your application folder, you'll need to add a `Dockerfile` where you customize it, including adding your application.\nFor example see for instance [Dockerfile in ezsystems/ezplatform](https://github.com/ezsystems/ezplatform/blob/master/doc/docker/Dockerfile-app).\n\n\nThen for building it you can for instance execute:\n```bash\ndocker build -t mycompany/myapp_volume:latest .\n```\n\nAnd by now you can execute some *(see below to attach database, ..)* commands to test it:\n```bash\ndocker run --rm mycompany/myapp_volume bin/console list\n```\n\n### Development use\n\n*Warning: As of December 2016, avoid using Docker for Mac/Windows beta for this setup, as it's load times are typically 60-90 seconds because of IO issues way worse then what Virtualbox ever had when doing shared folder. Which is essentially what is being used here when not on Linux, and when using what Docker calls host mounted volumes.*\n\nTo get started, lets set permissions for dev use _(Symfony 3.x structure reflected in example)_, and make sure to install composer packages:\n```bash\nsudo mkdir -p web/var\nsudo find web/var var -type d | xargs sudo chmod -R 777\nsudo find web/var var -type f | xargs sudo chmod -R 666\ndocker run --rm -u www-data -v `pwd`:/var/www -e SYMFONY_ENV=dev ezsystems/php:7.2 composer install --no-progress --no-interaction --prefer-dist\n```\n\n\nNow you can run some *(see below to attach database, ..)* commands to test it:\n```bash\ndocker run --rm -u www-data -v `pwd`:/var/www -e SYMFONY_ENV=dev ezsystems/php:7.2 bin/console list\n```\n\n\n### Use with full setup (database, ..)\n\nFor setting up a full setup with database and so on, see [ezplatform:doc/docker](https://github.com/ezsystems/ezplatform/tree/master/doc/docker) for further examples and instructions.\n\n\n## Possible roadmap for this PHP image\n\n- PHP plugins:\n - pdo_pgsql + pdo_sqlite\n- env variable to set session handler, ...\n- Apache + mod_php variant\n- Alpine Linux; *To drop image size, assuming all other official images move to Alpine.*\n\n## Copyright \u0026 license\nCopyright [eZ Systems AS](http://ez.no/), for copyright and license details see provided LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezsystems%2Fdocker-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezsystems%2Fdocker-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezsystems%2Fdocker-php/lists"}