1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-12 10:50:15 +00:00
kontain.me/cmd/git/test.sh
Jason Hall d3d7e20500 git: own the checkout as the image's user so git can write to it
The layer's entries were root-owned, but cgr.dev/chainguard/git runs as
uid 65532, so `git fetch`/`git commit` inside the checkout failed with
"Permission denied" creating .git/FETCH_HEAD. Stamp the base image's
runtime uid/gid onto every layer entry, and explicitly emit the
checkout's parent directories (git/, git/<repo>/, git/<repo>/.git/) so
the image extractor doesn't auto-create them root-owned.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:45:50 -04:00

10 lines
450 B
Bash
Executable file

#!/usr/bin/env bash
set -eux
time crane validate --remote=git.kontain.me/github.com/imjasonh/kontain.me:main
# Default tag resolves to the default branch (main): same commit, cache hit.
time crane validate --remote=git.kontain.me/github.com/imjasonh/kontain.me
docker run --rm git.kontain.me/github.com/imjasonh/kontain.me -c "git log -1"
docker run --rm git.kontain.me/github.com/google/go-containerregistry -c "git fetch --unshallow && git log"