Commit 6b19c6e
committed
docker: gate image cleanup behind DOCKER_PRUNE=yes (default off)
docker_cli_prepare() called docker_cleanup_old_images
unconditionally, which enumerates 'docker images' and rmi's old
armbian tags. Fine on a single-daemon workstation; broken on
hosts where several build framework invocations share one
dockerd — the usual setup when multiple self-hosted GH Actions
runners live on the same machine.
Two concurrent invocations race: runner A's cleanup fires
'docker rmi <id>' on a tag runner B just committed between
'Successfully built <sha>' and dockerd writing the imagedb
digest file. B's build then aborts with:
Successfully built ed6bcbe445e6
failed to get digest sha256:ed6bcbe445e6…:
open /var/lib/docker/image/overlay2/imagedb/content/sha256/…:
no such file or directory
Make the cleanup opt-in via DOCKER_PRUNE=yes. Default-off keeps
shared-daemon setups safe out of the box; single-host users who
want automatic disk reclaim flip the flag and either accept the
race risk or serialise their builds.
No behaviour change for users who add DOCKER_PRUNE=yes — same
codepath runs. Only the default changes.1 parent 4760a28 commit 6b19c6e
1 file changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
160 | 179 | | |
161 | 180 | | |
162 | 181 | | |
| |||
0 commit comments