{"id":15023392,"url":"https://github.com/tdmalone/docker-apache-phpx","last_synced_at":"2026-01-28T01:08:20.087Z","repository":{"id":96295396,"uuid":"126241162","full_name":"tdmalone/docker-apache-phpX","owner":"tdmalone","description":"Dockerfiles for running (almost) every minor version of PHP, with Apache.","archived":false,"fork":false,"pushed_at":"2018-03-22T00:50:23.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T13:36:34.455Z","etag":null,"topics":["apache","apache2","docker","php","php5","php53","php54","php55","php56","php7","php70","php71","php72","tm-id-au"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/tdmalone.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":"2018-03-21T21:11:28.000Z","updated_at":"2018-03-24T09:16:03.000Z","dependencies_parsed_at":"2023-04-18T08:03:53.224Z","dependency_job_id":null,"html_url":"https://github.com/tdmalone/docker-apache-phpX","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdmalone%2Fdocker-apache-phpX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdmalone%2Fdocker-apache-phpX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdmalone%2Fdocker-apache-phpX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdmalone%2Fdocker-apache-phpX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdmalone","download_url":"https://codeload.github.com/tdmalone/docker-apache-phpX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243318758,"owners_count":20272144,"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":["apache","apache2","docker","php","php5","php53","php54","php55","php56","php7","php70","php71","php72","tm-id-au"],"created_at":"2024-09-24T19:59:01.283Z","updated_at":"2026-01-28T01:08:20.047Z","avatar_url":"https://github.com/tdmalone.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker, Apache and PHPx\n\nDockerfiles for running (almost) every minor version of PHP, with Apache.\n\nBased on [work](https://github.com/bylexus/docker-apache-php53) originally by [Alexander Schenkel](https://github.com/bylexus).\n\nPHP versions available:\n* [PHP 5.3](php5.3/) (Ubuntu 12.04 LTS Precise)\n* [PHP 5.4](php5.4/) (Ubuntu 13.04 Raring)\n* [PHP 5.5](php5.5/) (Ubuntu 14.04 LTS Trusty)\n* [PHP 5.6](php5.6/) (Ubuntu 15.10 Wily)\n* [PHP 7.0](php7.0/) (Ubuntu 16.04 LTS Xenial)\n* [PHP 7.1](php7.1/) (Ubuntu 17.10 Artful)\n* [PHP 7.2](php7.2/) (Ubuntu 17.10 Artful)\n\nPHP versions maybe coming soon:\n* PHP 5.2\n\n## Why?\n\nBecause sometimes, you have to work with old software, and it's not immediately straightforward to figure out how to on newer systems!\n\nI put these together primarily as a tool to help me at work, where we're frequently upgrading old versions of WordPress and plugins that won't (yet) work on newer versions of PHP.\n\n## Quick Start\n\nFor PHP 5.3, for instance:\n\n    $ PHP_VERSION=5.3\n    $ WEB_ROOT=/path/to/your/web/root\n    $ HOST_PORT=8080\n\n    $ docker run --rm --detach --publish ${HOST_PORT}:80 --volume ${WEB_ROOT}:/var/www --name php${PHP_VERSION} tdmalone/docker-apache-phpx:${PHP_VERSION}\n\nThis will download the pre-built image for PHP 5.3, and start a container named `php5.3` on http://localhost:8080 (loading from the web root you supplied).\n\nWhen you've finished, you can clean up (and automatically remove the container) by running:\n\n    $ docker stop php${PHP_VERSION}\n\n## Building\n\nTo build the PHP 5.3 image yourself:\n\n    $ PHP_VERSION=5.3\n    $ WEB_ROOT=/path/to/your/web/root\n    $ HOST_PORT=8080\n\n    $ git clone https://github.com/tdmalone/docker-apache-phpX.git\n    $ docker build --tag php${PHP_VERSION} docker-apache-phpX/php${PHP_VERSION}\n    $ docker run --rm --detach --publish ${HOST_PORT}:80 --volume ${WEB_ROOT}:/var/www --name php${PHP_VERSION} php${PHP_VERSION}\n\nIf you set your web root to the folder that docker-apache-phpX was cloned into (eg. by running `WEB_ROOT=$PWD`), then you can visit http://localhost:8080/docker-apache-phpX/phpinfo.php to prove that you're running the PHP version you chose.\n\n## Development\n\nUbuntu has been chosen for these Dockerfiles for its ease-of-use and large, well maintained package repository. Wherever possible, LTS releases are used for increased stability.\n\nTo assist in creating new images or debugging current ones, you may find these links helpful:\n\n* The [Ubuntu releases list](https://wiki.ubuntu.com/Releases)\n* Details on eg. specific [PHP5 versions in Trusty](https://launchpad.net/ubuntu/trusty/+source/php5) or [PHP7 versions in Xenial](https://launchpad.net/ubuntu/xenial/+source/php7.0) (just change the release names and version numbers in the URLs for other combinations)\n* If particular versions aren't available, they may be in an [alternative repository](https://launchpad.net/~ondrej/+archive/ubuntu/php/) (see [this workaround](https://github.com/tdmalone/docker-apache-phpX/blob/master/php7.2/Dockerfile#L13-L16) for adding)\n* If a version of Ubuntu is out of support, you may need to [change the APT sources list](https://askubuntu.com/a/91821/421637)\n* Package versions for APT are pinned as [recommended by Hadolint](https://github.com/hadolint/hadolint/wiki/DL3008) - this is done by first building unpinned, and determining from that which versions are selected\n\nTo debug an image, swap `--detach` with `--interactive --tty` and add `bash` to the end, like this:\n\n    $ docker run --rm --interactive --tty --publish ${HOST_PORT}:80 --volume ${WEB_ROOT}:/var/www --name php${PHP_VERSION} php${PHP_VERSION} bash\n\nThen run `run` to simulate what would have happened if you started the container detached.\n\nThis repository is linked to an automated build at Docker Hub, with each subdirectory manually mapped to a version tag.\n\n## TODO\n\n* Make files writable by the web server\n* Increase the PHP upload limit to something much larger than the default\n* Make error logs available somewhere easy\n* Further documentation (eg. see [Alexander's repo](https://github.com/bylexus/docker-apache-php53) for more of the features he included, such as logging and setting error reporting level via an environment variable)\n\n## License\n\n[MIT](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdmalone%2Fdocker-apache-phpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdmalone%2Fdocker-apache-phpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdmalone%2Fdocker-apache-phpx/lists"}