{"id":20737116,"url":"https://github.com/phpexpertsinc/dockerize","last_synced_at":"2025-12-24T07:35:20.671Z","repository":{"id":45252817,"uuid":"124129162","full_name":"PHPExpertsInc/dockerize","owner":"PHPExpertsInc","description":"DockerPHP: Dockerize any PHP project in under 5 minutes.","archived":false,"fork":false,"pushed_at":"2025-11-09T15:57:04.000Z","size":3721,"stargazers_count":71,"open_issues_count":3,"forks_count":7,"subscribers_count":4,"default_branch":"v14.x","last_synced_at":"2025-11-09T17:29:47.621Z","etag":null,"topics":["docker","php","php8"],"latest_commit_sha":null,"homepage":"https://youtu.be/d8o9p2DimME","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/PHPExpertsInc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-03-06T19:39:53.000Z","updated_at":"2025-10-25T19:43:12.000Z","dependencies_parsed_at":"2023-12-07T11:27:09.988Z","dependency_job_id":"c80e911b-14c3-4c73-a9f7-e6d05fc8dde0","html_url":"https://github.com/PHPExpertsInc/dockerize","commit_stats":null,"previous_names":["phpexpertsinc/dockerize-php"],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/PHPExpertsInc/dockerize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fdockerize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fdockerize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fdockerize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fdockerize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHPExpertsInc","download_url":"https://codeload.github.com/PHPExpertsInc/dockerize/tar.gz/refs/heads/v14.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fdockerize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27997434,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","php","php8"],"created_at":"2024-11-17T06:13:34.533Z","updated_at":"2025-12-24T07:35:20.664Z","avatar_url":"https://github.com/PHPExpertsInc.png","language":"Shell","readme":"# Dockerize PHP\n\nA utility for rapidly deploying [Docker](https://www.docker.com) for PHP apps.\n\nWatch the zero-dependency installation video: https://youtu.be/d8o9p2DimME  \nInstalling on a legacy PHP 5.6 app in 2 minutes: https://youtu.be/xZxaJcsbrWU\n\n**This project has been tested against over 350,000 open-sourced Packagist packages (via the Bettergist Archiver project) and is compatible with 99.999% of them.**\n\nIncludes: \n * PHP 5.6, 7.0-7.4 + 8.0, 8.1, 8.2, 8.3, and 8.4.\n * Nginx\n * Redis v7.2\n * PostgreSQL v16\n * MariaDB v10.11\n\nCurrent PHP versions: \n\n* PHP 5.6.40-81+ubuntu24.04.1+deb.sury.org+1 (cli) \n* PHP 7.0.33-79+ubuntu24.04.1+deb.sury.org+1 (cli) (built: Dec 24 2024 06:43:22) ( NTS )\n* PHP 7.1.33-67+ubuntu24.04.1+deb.sury.org+1 (cli) (built: Dec 24 2024 06:50:54) ( NTS )\n* PHP 7.2.34-54+ubuntu24.04.1+deb.sury.org+1 (cli) (built: Dec 24 2024 06:58:15) ( NTS )\n* PHP 7.3.33-24+ubuntu24.04.1+deb.sury.org+1 (cli) (built: Dec 24 2024 07:05:25) ( NTS )\n* PHP 7.4.33 (cli) (built: Jul  3 2025 16:41:49) ( NTS )\n* PHP 8.0.30 (cli) (built: Jul  3 2025 16:39:43) ( NTS )\n* PHP 8.1.33 (cli) (built: Jul  3 2025 16:16:18) (NTS)\n* PHP 8.2.29 (cli) (built: Jul  3 2025 13:08:18) (NTS)\n* PHP 8.3.25 (cli) (built: Aug 29 2025 12:01:53) (NTS)\n* PHP 8.4.11 (cli) (built: Aug 29 2025 06:48:12) (NTS)\n\nThe `phpexperts/php:${PHP_VERSION}-full` images contain every bundled PHP extension, and Redis.\n\n* imap\n* ldap\n* pspell\n* redis\n* snmp\n* xmlrpc\n* Oracle ext-oci\n\nThe `phpexperts/php:VERSION-full` images contain everything in the full image plus drivers for Oracle (ext-oci8),\n\nIf you need an extension that is not available in the `full` build, please create an Issue at GitHub.\n\n# Installation\n\n* Watch the [**Installation HOWTO video**](https://youtu.be/xZxaJcsbrWU).\n\n* Here's another Zero Install demo including PHP 8.4 and the php-ci system for testing every version of PHP.\n\n[![phpexperts/dockerize Demo](https://private-user-images.githubusercontent.com/1125541/395483191-6dc866ed-b2fb-4262-98fe-2f8dbaa1e76f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzQwNzgxNDgsIm5iZiI6MTczNDA3Nzg0OCwicGF0aCI6Ii8xMTI1NTQxLzM5NTQ4MzE5MS02ZGM4NjZlZC1iMmZiLTQyNjItOThmZS0yZjhkYmFhMWU3NmYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MTIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDEyMTNUMDgxNzI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTFiOGM0ZDFkMTRlMmUwNTJmOWM5ZDA5M2U2OWU5NDFlOTk4ZTc2YmIwMmZiZjAyYmY3ZTZhMjI3OWRlZmIwMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.747HeCQJJpg9Snd93a0BECrVAF9-_lDwm-E32-d69nM)](https://youtu.be/rCfmTH62-os)\n\n## Via Bash (Zero PHP dependencies)\n\n    bash \u003c(curl -s 'https://raw.githubusercontent.com/PHPExpertsInc/dockerize/v12.x/dockerize.sh')\n\nThen edit credentials in .env.\n\n    docker compose up -d\n\n### Via Composer\n\n    # Ensure that vendor/bin is in your PATH and before /usr/bin.\n    composer require --dev phpexperts/dockerize\n    vendor/bin/php dockerize\n    # Edit credentials in .env.\n    docker compose up -d\n\nDon't forget to edit your docker compose.yml!\n\n### Configure your PATH\n\nIn order to dockerize your existing PHP project, do the following:\n\nEnsure that your profile PATH includes `./vendor/bin` and that it takes priority over any other directory that may include a php executable:\n\n    PATH=./vendor/bin:$PATH\n\n## Thank you, JetBrains\n\nJetBrains generously grants this project a free Open-Source License to PhpStorm and all other JetBrains products as part of its [Open Source License](https://www.jetbrains.com/community/opensource/) initiative.\n\n# Advantages over other dockerized PHP projects\n\n1. **Super fast, completely automated installation.** (Great for testing multiple versions on CIs)\n2. The **BIG** difference between www.phpdocker.io and Dockerize PHP is that Dockerize PHP provides all of the client utilities, where phpdocker.io provides NONE of them.\n\nOut of the box, you have per-project binaries:\n\n * **php**\n * **composer**\n * **php-ci.sh**\n * mysql\n * mysqldump\n * psql\n * pg_dump\n * createdb\n * dropdb\n * redis\n * redis-cli\n\n# PHP CI via Docker\n\nWith the **php-ci.sh** shell script, you can easily test your app or library against every major version of PHP (currently 7.4-8.3):\n\nIn the project root directory, where your phpunit.xml is, or where you'd normally run phpunit:\n\n    vendor/bin/php-ci.sh\n\nIt will then automagically update composer and run the appropriate version of PHPUnit for all of the major PHP versions\nsupported by your project via the power of Docker.\n\n## Latest Changes\n\n#### v14.1.0\n\n* **[2025-09-23 05:07:25 CDT]** Changed the default nginx listening port to 8000.\n* **[2025-09-21 22:47:18 CDT]** [major] Added a distroless nginx web image.\n* **[2025-09-21 22:35:18 CDT]** Embedded the default nginx virtualhost directly into the image.\n* **[2025-09-21 22:11:07 CDT]** Added base POSIX utilities to the distroless image.\n* **[2025-09-21 22:04:18 CDT]** [major] Made distroless the main form factor for containers.\n\n#### v14.0.0: Distroless Images\n\n* **[2025-08-16 19:07:33 CDT]** Upgraded to the latest PHP.\n* **[2025-08-17 19:11:13 CDT]** [major] Converted all of the PHP base images to distroless, saving 500 MB per image.\n\n#### v13.0.3\n* **[2025-07-03 02:54:38 CDT]** Fixed the ext-builder.\n\n#### v13.0.2\n* **[2025-05-01 19:09:42 CDT]** Version 13.0.2: Fixed the .gitattributes.\n\n#### v13.0.1\n* **[2025-04-21 00:04:11 CDT]** [php-ci] Fixed a bug.\n\n#### v13.0.0\n* **[2025-04-17 06:21:56 CDT]** Downverted the composer version constraints system to PHP 7.0.0 compatibility, with polyfills.\n* **[2025-04-17 05:56:47 CDT]** [m] Version bumped the PHP versions.\n* **[2025-04-17 05:08:34 CDT]** Completely reimplemented the PHP version parser.\n* **[2025-03-26 11:15:21 CDT]** [m] Renamed test/ to tests/.\n* **[2025-03-26 10:45:57 CDT]** Removed unnecessary distributables from composer install.\n* **[2025-03-26 10:35:51 CDT]** Moved the web root to public/.\n* **[2025-03-26 09:51:14 CDT]** Added ext-uuid to the extension builder system.\n* **[2025-03-26 09:40:29 CDT]** Completely reimplemented the PHP extension builder to use only 1 image for all PHP versions.\n* **[2025-03-26 08:21:47 CDT]** [bin/php] Optimized further when running natively and inside docker.\n* **[2025-03-25 13:21:46 CDT]** Added the PHP Extension Builder system.\n* **[2025-03-25 13:10:50 CDT]** [linux] Added the en_US.UTF-8 locale so more apps will work.\n* **[2025-03-25 13:08:48 CDT]** Added steps to download ext-uuid source code.\n* **[2025-03-25 13:04:45 CDT]** Ignore all .build-assets/ directories.\n* **[2025-03-24 13:34:41 CDT]** [fixed] Ensured proper command execution in the entrypoint.\n* **[2025-03-24 13:33:11 CDT]** [bin/php] Sets the working directory of the CLI to the current project directory.\n* **[2025-03-24 13:32:15 CDT]** [bin/php] Default to host network if no project network exists\n* **[2025-03-24 13:31:12 CDT]** [bin/php] Propagate the exit code from native php execution.\n\n#### v12.2.1\n* **[2025-03-24 13:20:03 CDT]** [bin/php] Complete fixed native PHP dispatching.\n\n#### v12.2.0\n* **[2025-03-23 00:33:11 CDT]** Fixed a bug where the native PHP binary couldn't find files.\n\n#### v12.1.2\n* **[2024-12-21 13:32:23 CDT]** Improved PHP 8.4 support.\n* **[2025-03-17 16:31:30 CDT]** Built PHP 8.1.32, 8.2.28, 8.3.19, 8.4.5. HEAD -\u003e v12.x\n\n#### v12.1.1\n* **[2025-03-13 17:25:06 CDT]** [php-ci] Refactored a lot.\n\n#### v12.1.0\n* **[2025-03-12 18:32:13 CDT]** Upgraded PHP 8.3.17 and 8.4.4.\n* **[2025-03-12 17:50:58 CDT]** Renabled build support for PHP 5.6-7.3.\n* **[2025-03-12 17:45:01 CDT]** [php-ci] Added support for PHPUnit v12.\n* **[2025-03-12 17:37:04 CDT]** [php-ci] Added PHPUnit support for PHP 7.0 and 7.1.\n\n#### v12.0.2\n* **[2025-01-07 08:11:57 CST]** Fixed a bug where native PHP detection via .env didn't work.\n* **[2024-12-13 02:18:41 CST]** Added another YouTube demo.\n\n#### v12.0.1\n* **[2024-12-13 01:51:43 CST]** Added PHP 8.4 support to php-ci.sh HEAD -\u003e v12.x, origin/v12.x\n\n#### v12.0.0\n* **[2024-12-12 16:19:40 CST]** Added support for PHP 8.4.\n* **[2024-12-12 23:55:18 CST]** Majorly overhauled the dockerize installer.\n\n#### v11.1.0\n* **[2024-09-26 07:37:40 CDT]** Add composer to the PHP 8.4 image. HEAD -\u003e v11.0\n* **[2024-09-26 07:36:44 CDT]** Fixed the PHP 8.4 entrypoint to use the standard entrypoint.\n* **[2024-09-13 03:48:00 CDT]** Added support for PHP 8.4 beta5.\n* **[2024-09-12 05:30:37 CDT]** [m] Updated the README.\n* **[2024-09-12 01:58:49 CDT]** [m] Use the new ENV format in the Dockerfiles.\n* **[2024-09-12 01:44:09 CDT]** Fixes for PHP 8.4 beta4 builds.\n* **[2024-09-09 12:55:33 CDT]** [m] Prioritized the installation instructions in the README.md.\n\n#### v11.0.0\n* **[2024-09-07 18:55:07 CDT]** [major] Upgraded to Ubuntu 24.04 Noble Numbat.\n* **[2024-09-07 18:55:45 CDT]** Fixed a major reversion in web-debug by readding php-fpm.\n* **[2024-09-07 17:20:24 CDT]** Added initial steps for creating a distroless PHP image. origin/v11.0\n* **[2024-09-07 19:00:42 CDT]** Use a docker volume to store apt metadata.\n* **[2024-08-05 03:46:54 CDT]** Added support for PHP 8.4 Alpha 4.\n* **[2024-08-05 04:33:33 CDT]** Added a bash installation script to the composer package.\n\n## Manage with docker compose\n\nTo control the containers, use `docker compose`.\n  \n    # Downloads the images, creates and launches the containers.\n    docker compose up -d\n    # View the logs\n    docker compose logs -ft\n    # Stop the containers\n    docker compose stop\n\nThat's it! You now have the latest LEPP (Linux, Nginx, PostgreSQL, PHP) stack or\nthe latest LEMP (Linux, Nginx, MariaDB, PHP) stack.\n\n# User ID control\n\nIt is possible to control what UID the initial process (usually PHP) and/or PHP-FPM processes run as. The `bin/php` file already does this for the initial process.\n\nThis is important if you are mounting a volumes into the container, as the the UID of the initial process or PHP-FPM will likely need to match the volume to be able to read and/or write to it.\n\n## PHP-FPM process UID\n\nTo set the UID for the PHP-FPM process, you should set the `PHP_FPM_USER_ID` environmental variable on the container. e.g:\n\n    docker run -e PHP_FPM_USER_ID=1000 phpexperts/php:7 php-fpm5.6\n\n# Distribution\n\nDocker Hub:\n * https://hub.docker.com/r/phpexperts/php/\n * https://hub.docker.com/r/phpexperts/web/\n\n# About PHP Experts, Inc.\n\n[PHP Experts, Inc.](https://www.phpexperts.pro/), is my consultation company. It's a small company of a half dozen \nhighly skilled Full Stack PHP devs, including myself, whom I place at 1099 positions at other corporations. We fill both \nlong-term positions and, for crazy devs like me, short-term. If you ever wanted to work on a different project/company \nevery few months or even weeks, anywhere in the continental U.S., Europe, or South East Asia, it's fantastic.  \n\nSince 2015, I have set up branches in Las Vegas, Houston, the UK, Dubai, Costa Rica, Colombia, India, and the Philippines. \nIf someone has a work auth in any of those places, we can place you almost anywhere you want. I travel 50% of the time \nout of choice. All over the world.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpexpertsinc%2Fdockerize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpexpertsinc%2Fdockerize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpexpertsinc%2Fdockerize/lists"}