Skip to content

Simplify docker:push using buildx bake's native compose support - #429

Merged
lyrixx merged 2 commits into
mainfrom
simplify-docker-push
Sep 7, 2026
Merged

lyrixx merged 2 commits into
mainfrom
simplify-docker-push

Conversation

@lyrixx

@lyrixx lyrixx commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • docker:push now lets docker buildx bake read docker-compose.yml/docker-compose.dev.yml directly instead of hand-parsing the compose config and generating a temporary HCL bake file; cache-to and PHP_VERSION are injected via --set since they aren't declared in the compose file.
  • Added a self-contained docker:test-push task that builds and pushes real cache images to a throwaway registry (its own network + a scoped buildx builder, so it works whether the ambient builder uses the docker or docker-container driver), then tears everything down.
  • Wired docker:test-push into CI, and made castor init drop the test file since it has no purpose in a generated project.

Test plan

  • castor docker:push --dry-run and a real castor docker:push against a throwaway local registry
  • castor docker:build still works without attempting to push cache
  • castor docker:test-push end-to-end, including with an isolated docker-container buildx builder (the driver used in CI)
  • castor qa:phpstan / php-cs-fixer clean on all touched files

lyrixx added 2 commits August 27, 2026 15:58
…pport

docker buildx bake can read docker-compose.yml directly (context, dockerfile,
target, cache_from), removing the need to hand-parse the compose config and
generate a temporary HCL bake file. cache-to and PHP_VERSION are injected via
--set since they aren't declared in the compose file.
Spins up a disposable registry.:2 container plus a scoped buildx builder
(isolated network + insecure-HTTP buildkitd config, so it works the same
with the docker-container driver used in CI as with the plain docker
driver) to actually build, push and verify the cache images, then tears
everything down.

Wired into CI as a dedicated step, and dropped by "castor init" like the
other template-only files since it has no purpose in a generated project.
@lyrixx
lyrixx requested a review from pyrech August 27, 2026 14:56
@lyrixx
lyrixx merged commit 2c60e63 into main Sep 7, 2026
4 checks passed
@lyrixx
lyrixx deleted the simplify-docker-push branch September 7, 2026 09:21
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