Skip to content

Fix Docker quickstart on homepage: use CakePHP's official ghcr.io image - #8343

Merged
LordSimal merged 1 commit into
cakephp:5.xfrom
Nelwhix:fix/docker-quickstart-index
Oct 1, 2026
Merged

LordSimal merged 1 commit into
cakephp:5.xfrom
Nelwhix:fix/docker-quickstart-index

Conversation

@Nelwhix

@Nelwhix Nelwhix commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #8341, which this replaces (GitHub won't let me reopen #8341
since its branch was force-pushed after close).

Change

Both Docker commands on the homepage now use ghcr.io/cakephp/cakephp:|phpversion|:

  • composer create-project runs inside that image — only Composer itself
    needs installing now, not PHP extensions, since intl etc. are already
    in the image.
  • The dev server command uses the same image and calls php bin/cake.php server (the actual PHP entry point, not the bin/cake shell script) and
    now has pdo_mysql, so it no longer 500s on the welcome page.

Verified

Ran both commands locally end to end:

  • composer create-project --prefer-dist cakephp/app:~5.4 completes cleanly
    inside ghcr.io/cakephp/cakephp:8.3.
  • php bin/cake.php server -H 0.0.0.0 starts the dev server.
  • The welcome page returns HTTP 200 with no MissingExtensionException

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.
@Nelwhix Nelwhix closed this Sep 30, 2026
@Nelwhix Nelwhix reopened this Sep 30, 2026
@LordSimal
LordSimal merged commit 846dc46 into cakephp:5.x Oct 1, 2026
12 checks passed
@LordSimal

Copy link
Copy Markdown
Member

Thanks, it looks better, but the version replacement has two ** in there.
image

Also can you fix the docker part in https://book.cakephp.org/5.x/installation.html#method-3-docker as well and maybe other places, where the new image could be used?

markstory pushed a commit that referenced this pull request Oct 2, 2026
Follow-up to #8343. The |phpversion| substitution is configured with
format: 'bold', which wraps the value in markdown ** syntax. That's
fine in prose, but markdown-it doesn't process inline markdown inside
fenced code blocks, so readers saw the literal text
"ghcr.io/cakephp/cakephp:**8.5**" instead of a working image tag.

Pinned the tag to 8.5 directly in both Docker commands on the
homepage instead (same convention the Docker block already used
before, where the PHP version was hardcoded as php:8.2-cli).

Also updated the Docker section (Method 3) on the installation page
to the same ghcr.io/cakephp/cakephp image, since it had the identical
underlying bugs (missing intl/pdo_mysql, apt-get installing
extensions at runtime, "php bin/cake" instead of "php bin/cake.php").
Grepped the rest of docs/ for other docker run / php:8.x examples;
these two pages were the only ones referencing CakePHP's own Docker
setup.

Verified both updated commands end to end again with real
`docker run`: composer create-project and the dev server both work
against ghcr.io/cakephp/cakephp:8.5, welcome page returns HTTP 200.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants