Skip to content

[Bug]: container system df double-counts image storage when the same image has multiple tags #1527

Description

@realrajaryan

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

Pull one image, tag it, and compare system df before and after the tag:

$ container system df --format json
{
  "containers" : {
    "active" : 0,
    "reclaimable" : 0,
    "sizeInBytes" : 0,
    "total" : 0
  },
  "images" : {
    "active" : 0,
    "reclaimable" : 78729216,
    "sizeInBytes" : 78729216,
    "total" : 1
  },
  "volumes" : {
    "active" : 0,
    "reclaimable" : 0,
    "sizeInBytes" : 0,
    "total" : 0
  }
}

$ container image tag alpine:latest local/alpine:issue-repro
local/alpine:issue-repro

$ container system df --format json
{
  "containers" : {
    "active" : 0,
    "reclaimable" : 0,
    "sizeInBytes" : 0,
    "total" : 0
  },
  "images" : {
    "active" : 0,
    "reclaimable" : 157458432,
    "sizeInBytes" : 157458432,
    "total" : 2
  },
  "volumes" : {
    "active" : 0,
    "reclaimable" : 0,
    "sizeInBytes" : 0,
    "total" : 0
  }
}

$ du -sk "/Users/ras/Downloads/test_container/audit_artifacts/container-issue-repros-20260511-101939/app-root/content/blobs/sha256"
4124    /Users/ras/Downloads/test_container/audit_artifacts/container-issue-repros-20260511-101939/app-root/content/blobs/sha256

$ du -sk "/Users/ras/Downloads/test_container/audit_artifacts/container-issue-repros-20260511-101939/app-root/snapshots"
76884   /Users/ras/Downloads/test_container/audit_artifacts/container-issue-repros-20260511-101939/app-root/snapshots

Problem description

Adding a second tag for the same image doubles the reported image size and reclaimable bytes even though no additional storage is created. system df should count unique image storage, not tags/references.

Environment

- OS: macOS 26.4.1 (25E253)
- Xcode: Xcode 26.4.1 (17E202)
- Container: container CLI 0.12.3 (build: release, commit: f989901)

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

Labels

nextMust-have items for current and next milestonestorageissues and features associated with storage.uxUser experience features and fixes.

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo