Skip to content

Restore git binary in final runtime image#67

Merged
ChiragAgg5k merged 2 commits intomainfrom
restore-git-binary
Apr 29, 2026
Merged

Restore git binary in final runtime image#67
ChiragAgg5k merged 2 commits intomainfrom
restore-git-binary

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

Summary

Why this matters

PR #66 removed several package names from the runtime apk add list: git, rsync, zip, imagemagick, certbot, docker-cli. Inspecting appwrite/base:1.2.0 shows that everything except git is still present in the final filesystem — those binaries are provided by the upstream phpswoole/swoole:php8.5-alpine base image, so removing the duplicate apk line had no runtime effect. git is the exception: it was uniquely added by this repo back in 504b0ba ("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

  • CI builds the image and tests.yaml passes, including the new Git command check
  • Manually verify git --version works inside the published image after merge

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-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR restores git to the final stage apk add list in the Dockerfile, fixing a regression introduced in 1.2.0 where it was inadvertently removed during a size-reduction refactor. It also adds a container-structure-test to prevent future regressions and bumps PHP/Swoole version assertions in tests.yaml to match the upstream phpswoole/swoole:php8.5-alpine base image.

Confidence Score: 5/5

Safe to merge — minimal, targeted fix with a regression test added.

All three changes are correct and well-scoped: the Dockerfile restores git in the right place (alphabetical order), the test uses a valid regex pattern for git version output, and the changelog is accurate. No logic errors or security concerns.

No files require special attention.

Important Files Changed

Filename Overview
Dockerfile Restores git to the final-stage apk add list in alphabetical order; one-line, targeted fix.
tests.yaml Adds a git --version regression test, and bumps PHP (8.5.5) and Swoole (6.2.1) version assertions to match upstream.
CHANGES.md Adds a 1.2.1 changelog entry documenting the git restore, new test, and upstream version bumps.

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.
@ChiragAgg5k ChiragAgg5k merged commit 8292869 into main Apr 29, 2026
17 checks passed
@ChiragAgg5k ChiragAgg5k deleted the restore-git-binary branch April 29, 2026 09:32
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