Skip to content

Commit d919c9a

Browse files
authored
Merge pull request #3261 from manics/dont-prune-new
buildkitPruner: don't prune very recent images
2 parents 35450f0 + cb061cd commit d919c9a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mybinder/templates/buildkit-pruner.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
- /bin/sh
2727
- -c
2828
- |
29-
docker image prune --force --all && \
29+
docker image prune --force --all --filter until={{ .Values.buildkitPruner.olderThanMinutes }}m && \
3030
docker builder prune --force --all --keep-storage={{ .Values.buildkitPruner.buildkitCacheSize }} && \
3131
docker system df
3232
volumeMounts:

mybinder/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ buildkitPruner:
1414
# Use the same image as we use for dind
1515
image: docker:27.5.1-dind
1616
buildkitCacheSize: 300GB
17+
# Only prune images older than
18+
olderThanMinutes: 120
1719
# Run this every 5min
1820
schedule: "*/5 * * * *"
1921

0 commit comments

Comments
 (0)