Skip to content

Commit dbec88b

Browse files
authored
Merge pull request #14 from bgilbert/prune
autobuild: prune old container layers after rebuilding container
2 parents 7197851 + f7fd23d commit dbec88b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autobuild/run.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ def setup():
5454
if path.stat().st_mtime < threshold:
5555
path.unlink()
5656

57-
# rebuild container
57+
# rebuild container and prune old layers
5858
subprocess.run(
5959
[
6060
'podman', 'build', '--pull', '-t', CONTAINER,
6161
Path(__file__).parent,
6262
],
6363
check=True
6464
)
65+
subprocess.run(
66+
['podman', 'image', 'prune', '-f'],
67+
check=True
68+
)
6569

6670
# fetch
6771
if (SRCDIR / '.git').exists():

0 commit comments

Comments
 (0)