Skip to content

[Bug]: A pull with no --platform unpacks an ext4 snapshot for every platform in the index #2165

Closed

Description

@MayCXC

I have done the following

  • I have searched the existing issues
  • I have reproduced the issue using the main branch of this project

Steps to reproduce

  1. On an arm64 machine, container image pull any multi-arch reference (for example alpine:latest, which carries eight platforms).
  2. Inspect the snapshot directories under the application data root.
  3. Every platform in the image's index has been unpacked into its own ext4 snapshot, not only linux/arm64.

The same happens for container image load and for container build when no --platform is given.

Five small multi-arch images measured 20G of snapshots this way, of which one platform's worth was reachable.

Problem description

Only the host's platform is ever mounted from this store. A snapshot for linux/amd64, linux/s390x, linux/riscv64 and the rest is an ext4 filesystem that nothing on the machine can attach, paid for at pull time and kept until something prunes it.

Correct behavior: unpack the host's platform when no flag names one, and leave the others in the content store where they cost compressed blobs rather than filesystems. An explicit --platform still unpacks exactly what it names, and a platform that is asked for later can be unpacked on demand, which is already how a Rosetta run of an amd64 image acquires its snapshot.

For reference, the engine default that docker image pull documents is one platform per pull, the host's, which scopes what is fetched as well as what is unpacked: https://docs.docker.com/reference/cli/docker/image/pull/ . Fetching every platform and narrowing only the unpacking is a deliberate difference worth keeping here, since it leaves a foreign platform available to run under Rosetta or to be pushed on without a second fetch.

Related storage reports, both closed: #784, #1875.

Environment

  • OS: macOS 26.6 (25G72)
  • Xcode: 26.6 (17F113)
  • Swift: 6.3
  • Container: source main at 388d964f382456c6b906f3c67e6daf6ec05b752a

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions