Skip to content

[Bug]: container build transfers an empty local context and COPY cannot find files #2037

Description

@zebrapurring

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

mkdir container-context-repro
cd container-context-repro

printf '%s\n' \
  'FROM scratch' \
  'COPY staged-run.sh /run.sh' >Dockerfile

printf '%s\n' '#!/bin/sh' >staged-run.sh

container build \
  --platform linux/arm64 \
  --progress plain \
  --tag local/container-context-repro:latest \
  .

There is no .dockerignore.

Current behaviour

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B 0.0s done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load build context
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [linux/arm64/v8 1/1] COPY staged-run.sh /run.sh
#4 ERROR: failed to calculate checksum ... "/staged-run.sh": not found

Expected behaviour

The local context should include staged-run.sh, and the image should build
successfully.

Problem description

container build transfers a 2B local build context and fails every COPY,
even for a root-level file in a minimal context with no .dockerignore.

The failure persists after stopping and deleting the builder, pulling
ghcr.io/apple/container-builder-shim/builder:0.12.0 again, and starting a new
builder.

Environment

- macOS 26.6 (25G72)
- Xcode 26.6 (17F113)
- Swift 6.3.3
- container CLI 1.1.0
- container-apiserver 1.1.0
- builder image ghcr.io/apple/container-builder-shim/builder:0.12.0
- architecture arm64
- builder resources: 8 CPUs, 12288 MB

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions