Skip to content

Commit 846dc46

Browse files
authored
Use CakePHP's official ghcr.io image for Docker quickstart (#8343)
Supersedes the previous fix on this branch. As discussed in the PR, CakePHP now publishes its own PHP images to GHCR (ghcr.io/cakephp/cakephp) with intl, pdo_mysql, and the other extensions CakePHP needs already baked in. This replaces the install-extensions-at-runtime pattern with that image for both Docker commands on the homepage: - composer create-project now runs inside the official image (only Composer itself needs installing, not PHP extensions) - the dev server now runs `php bin/cake.php server`, using the official image too, instead of php:8.2-cli (which lacked intl and pdo_mysql, and which was also being handed the bin/cake shell script instead of its actual PHP entry point) Verified end to end: composer create-project succeeds, the dev server starts, and the welcome page renders normally (no MissingExtensionException) at http://localhost:8765.
1 parent acdb2dd commit 846dc46

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎docs/en/index.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ ddev launch
5858
```
5959

6060
```bash [Docker]
61-
# Using official PHP image
62-
docker run -it --rm -v $(pwd):/app composer create-project \
63-
--prefer-dist cakephp/app:~|cakeversion| my_app
61+
# Using CakePHP's official image (ghcr.io/cakephp/cakephp), which bundles
62+
# the extensions CakePHP needs (intl, pdo_mysql, etc.)
63+
docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpversion| sh -c \
64+
"curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
65+
&& composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app"
6466

6567
cd my_app
6668
docker run -it --rm -p 8765:8765 -v $(pwd):/app \
67-
-w /app php:8.2-cli php bin/cake server -H 0.0.0.0
69+
-w /app ghcr.io/cakephp/cakephp:|phpversion| php bin/cake.php server -H 0.0.0.0
6870
```
6971

7072
:::

0 commit comments

Comments
 (0)