Restore git binary in final runtime image#67
Conversation
Dropped from the apk install list in 1.2.0 (#66) during the size-reduction refactor. Other binaries removed in that same diff (rsync, zip, imagemagick, certbot, docker-cli) are still provided by the phpswoole/swoole base image, but git is not — so it actually disappeared from the final image and broke VCS-dependent services. Adds a container-structure-test so a future regression is caught.
Greptile SummaryThis PR restores Confidence Score: 5/5Safe to merge — minimal, targeted fix with a regression test added. All three changes are correct and well-scoped: the Dockerfile restores No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "Bump PHP/Swoole version assertions in te..." | Re-trigger Greptile |
Upstream phpswoole/swoole:php8.5-alpine moved to PHP 8.5.5 / Swoole 6.2.1, which broke the pinned assertions. The git apk add change is unrelated to these failures.
Summary
gitback to theapk addlist in the final stage ofDockerfile. It was dropped in Refactored Dockerfile to reduce size. xDebug now a separate build stage #66 (1.2.0) during the size-reduction refactor.container-structure-testforgit --versionso a future regression is caught.CHANGES.mdto 1.2.1.Why this matters
PR #66 removed several package names from the runtime
apk addlist:git,rsync,zip,imagemagick,certbot,docker-cli. Inspectingappwrite/base:1.2.0shows that everything exceptgitis still present in the final filesystem — those binaries are provided by the upstreamphpswoole/swoole:php8.5-alpinebase image, so removing the duplicate apk line had no runtime effect.gitis the exception: it was uniquely added by this repo back in504b0ba("Install git for VCS service") and is not in the swoole base, so it actually disappeared from 1.2.0. Services that shell out to git (VCS sync etc.) would break on the new image.Test plan
tests.yamlpasses, including the newGit commandcheckgit --versionworks inside the published image after merge