Skip to content

feat: container storage usage in exegol info#300

Open
skyf0l wants to merge 2 commits intoThePorgs:devfrom
skyf0l:feat/container-storage-usage
Open

feat: container storage usage in exegol info#300
skyf0l wants to merge 2 commits intoThePorgs:devfrom
skyf0l:feat/container-storage-usage

Conversation

@skyf0l
Copy link
Copy Markdown

@skyf0l skyf0l commented Mar 7, 2026

Add container storage size display to exegol info

Adds a "Storage" column displaying each container's disk usage, excluding the shared base image layers.

Display Modes

Normal mode: Shows total size (container + workspace)
image

Verbose mode (-v): Shows breakdown
image

Implementation

  • Uses Docker API containers(size=True) to fetch SizeRw (container writable layer)
  • Calculates workspace size via os.walk() with symlink safety (followlinks=False)
  • Formats sizes using existing ExegolImage.__processSize() helper
  • Base image layers are shared across containers (0 MB duplication per container)

Technical Details

  • Container size: Changes made on top of the base image (configs, cache, logs, etc.)
  • Workspace size: Files in mounted /workspace directory
  • Total displayed: Sum of both in normal mode, breakdown in verbose mode

Copy link
Copy Markdown
Member

@Dramelac Dramelac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, this is a very good idea!
I'll put it on hold for now because there is some change I want to make to access the container size directly from DockerUtils and not from ExegolContainer.
I'll update this PR directly myself later

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants