Build with setup-buildx-action@v4 + bake-action@v7 uses remote git context -> Git LFS pointer files in build context
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- docker, github-actions
- 領域
- build-system, ci-cd, devops
調査の方向性
.github/workflows/smoke-test.yml から始め、setup-buildx-action@v3/bake-action@v5 と @v4/@v7 の設定を比較します。特にサブディレクトリのコンテキストを確認してください。docker/akeeba-backup.zip をコピーして検証する Dockerfile の行を確認し、その後、Git LFS を有効にした actions/checkout@v6 で再現します。完了の条件は、ローカルコンテキストの動作が修正されるか明確に文書化され、ビルドが LFS ポインターを受け取らなくなることです。
索引モデルが issue の本文から書いたものです。
説明
Environment
- Repository using workflow: https://github.com/zeckson/mykapitel.ru (workflow path: .github/workflows/smoke-test.yml)
- GitHub Actions run: https://github.com/zeckson/mykapitel.ru/actions/runs/30447565481
- Workflow uses: actions/checkout@v6 (with lfs: true), docker/setup-buildx-action@v4, docker/bake-action@v7
- Works with older actions: setup-buildx-action@v3 + bake-action@v5
What happens
- When building with setup-buildx-action@v4 + bake-action@v7 and a build context that points to a subdirectory (./docker) containing a Git LFS-tracked file (docker/akeeba-backup.zip), BuildKit resolves that context as a remote git checkout and does not apply Git LFS smudge filters.
- The file seen inside the build context is a Git LFS pointer (contains the text "version https://git-lfs.github.com/spec/v1"), and the Dockerfile in this project intentionally rejects pointer files, causing the build to fail.
Failure log excerpt
- Error: akeeba-backup.zip is a Git LFS pointer, not the actual file.
- Dockerfile lines involved:
COPY docker/akeeba-backup.zip /tmp/backup.zip
RUN if grep -q "version https://git-lfs.github.com/spec/v1" /tmp/backup.zip; then echo "Error: akeeba-backup.zip is a Git LFS pointer, not the actual file." && exit 1; fi && unzip -t /tmp/backup.zip && unzip /tmp/backup.zip -d /app && rm /tmp/backup.zip
Reproduction steps
- actions/checkout@v6 with lfs: true is used in the workflow so the runner workspace contains the smudged LFS file after checkout and (optionally) git lfs pull.
- The workflow then sets up buildx using docker/setup-buildx-action@v4 and invokes docker/bake-action@v7 with a context set to the docker/ subdirectory (or similar subdir context).
- BuildKit/bake resolves the subdirectory context via a remote git fetch which returns raw pointer file(s) and the build fails when the Dockerfile detects the pointer.
Expected
- When the runner workspace already has LFS objects checked out (actions/checkout + git lfs pull), bake/buildx should be able to use the smudged local files when the workflow requests a local workspace context, or at minimum there should be a clear way to force local context usage so builds don’t inadvertently use remote git checkouts that skip smudge filters.
- Behavior observed with setup-buildx@v3 + bake-action@v5: build used local workspace context (or LFS smudged files) and succeeded.
Notes and suggestions
- This appears to be related to how bake/buildx resolves subdirectory contexts — resolving them as remote git contexts causes LFS smudge filters to be bypassed, exposing pointer files to the build.
- Possible mitigation in workflows: explicitly force bake to use the local workspace context (e.g. *.context=./) and ensure git lfs pull runs on the runner before bake. But the action should either document this nuance or provide an option to prefer the runner workspace/local context when available.
Attachments / additional info
- Full failing run: https://github.com/zeckson/mykapitel.ru/actions/runs/30447565481 (logs are attached to that run)
Please let me know if you want me to open a minimal repro PR; I can also provide the exact workflow file and Dockerfile used in the failing run.
- 主要言語
- TypeScript
- スター
- 303
- フォーク
- 43
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/bake-action のほかの issue
-
kind/enhancement status/triage
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
docker/bake-action#458 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[subaction/matrix] Generate multiple matrices when targets reference other targets as build contextsオープンkind/enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
docker/bake-action#435 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
status/triage
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
docker/bake-action#329 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status/triage
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
docker/bake-action#322 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status/needs-more-info
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
docker/bake-action#312 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
docker/bake-action の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openedx/frontend-app-authoring#3274 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area/documentation status/need-triage
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
google-gemini/gemini-cli#29548 ·
メンテナーはふだん 1 日以内に返信
-
sdk-typescript vector-store
難易度 2/5 半日 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信