diff --git a/.vitepress/config.js b/.vitepress/config.js index 271339460e..efcf87c417 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -47,6 +47,7 @@ const plugins = { const substitutions = { '|phpversion|': { value: '8.5', format: 'bold' }, + '|phpdockerversion|': '8.5', '|minphpversion|': { value: '8.2', format: 'italic' }, '|cakeversion|': '5.4', '|cakefullversion|': 'CakePHP 5', diff --git a/docs/en/index.md b/docs/en/index.md index 6a8e96a55e..7b8f042c73 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -60,13 +60,13 @@ ddev launch ```bash [Docker] # Using CakePHP's official image (ghcr.io/cakephp/cakephp), which bundles # the extensions CakePHP needs (intl, pdo_mysql, etc.) -docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpversion| sh -c \ +docker run -it --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| sh -c \ "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app" cd my_app docker run -it --rm -p 8765:8765 -v $(pwd):/app \ - -w /app ghcr.io/cakephp/cakephp:|phpversion| php bin/cake.php server -H 0.0.0.0 + -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| php bin/cake.php server -H 0.0.0.0 ``` ::: diff --git a/docs/en/installation.md b/docs/en/installation.md index 4b590f511c..ede496c4c5 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -130,19 +130,17 @@ Check [DDEV Documentation](https://ddev.readthedocs.io/) for installation and ad For containerized development: ```bash -# Create project using Composer in Docker. -# CakePHP requires the intl extension, which the base composer image does not -# provide, so run Composer inside a PHP image with intl installed. -docker run --rm -v $(pwd):/app -w /app php:8.2-cli bash -c \ - "apt-get update && apt-get install -y libicu-dev git unzip curl \ - && docker-php-ext-install intl \ - && curl -sS https://getcomposer.org/installer | php \ - && php composer.phar create-project --prefer-dist cakephp/app:~|cakeversion| my_app" - -# Start PHP development server (install required extensions first) +# Create project using CakePHP's official image (ghcr.io/cakephp/cakephp), +# which bundles the extensions CakePHP needs (intl, pdo_mysql, etc.) so only +# Composer itself needs installing. +docker run --rm -v $(pwd):/app -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| sh -c \ + "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ + && composer create-project --prefer-dist cakephp/app:~|cakeversion| my_app" + +# Start PHP development server cd my_app docker run -it --rm -p 8765:8765 -v $(pwd):/app \ - -w /app php:8.2-cli bash -c "apt-get update && apt-get install -y libicu-dev && docker-php-ext-install intl mbstring && php bin/cake server -H 0.0.0.0" + -w /app ghcr.io/cakephp/cakephp:|phpdockerversion| php bin/cake.php server -H 0.0.0.0 ``` ::: warning Development Only