Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: delete container after use #617

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

AtomicFS
Copy link
Collaborator

@AtomicFS AtomicFS commented Mar 14, 2025

Delete a container in GitHub CI to conserve disk space.

As mentioned in one of the comments, it is not really possible to delete only the specific container. They are somehow embedded into the Dagger Engine (don't know how, possibly in the attached docker volume). So as a workaround we remove the whole Dagger Engine container and it's volume (but keep Dagger Engine image, to not download it again).

This way keep reclaiming disk space, and surprisingly there is not much time-penalty.

Given how it works under the hood, I thought it would be better to avoid automatic enforcement if GitHub CI is detected, and instead as enable this behavior with optional argument.

fixes #560

@github-actions github-actions bot added feature New feature or request testing Testing related github_actions Pull requests that update GitHub Actions code labels Mar 14, 2025
@AtomicFS AtomicFS force-pushed the feat/delete-container-after-use branch from a5aa3a4 to 23fd4e7 Compare March 14, 2025 11:27
@AtomicFS AtomicFS marked this pull request as ready for review March 14, 2025 11:45
@AtomicFS AtomicFS requested a review from MDr164 as a code owner March 14, 2025 11:45
@AtomicFS AtomicFS enabled auto-merge March 14, 2025 11:47
@AtomicFS AtomicFS force-pushed the feat/delete-container-after-use branch from 23fd4e7 to 704f8bd Compare March 14, 2025 13:28
- in GitHub public runners there is only 14GB of disk space
- when building complex firmware stack recursively we often run out of
  disk space
- this new feature removes the Dagger engine after each successful
  build, freeing up precious space

AI-Generated: true
AI-Model: claude-3.7-sonnet
Signed-off-by: dependabot[bot] <[email protected]>
@AtomicFS AtomicFS force-pushed the feat/delete-container-after-use branch from 3526c65 to bbd525b Compare March 14, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request github_actions Pull requests that update GitHub Actions code testing Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

in GitHub CI delete container on success
1 participant