![]() This fix tries to fix the issue raised in 29486 where interrupted `docker build` leaves some tmp files in `/var/lib/docker/tmp`. With tmp file name prefixed with `/var/lib/docker/tmp/docker-builderXXXXXX`. The reason for the issue is that in `MakeTarSumContext()`: ``` if err := chrootarchive.Untar(sum, root, nil); err != nil { return nil, err } ``` the `err` is shadowed and caused the clean up function in `defer func()` not being called. This fix fixes the issue. This fix is tested manually, as was specified in 29486: ``` rm -rf /var/lib/docker/tmp mkdir repro && cd repro fallocate -l 300M bigfile cat > Dockerfile <<EOF FROM scratch COPY ./bigfile / EOF docker build . {Cancel} ls -la /var/lib/docker/tmp ``` This fix fixes 29486. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> |
||
---|---|---|
.. | ||
dockerfile | ||
dockerignore | ||
builder.go | ||
context.go | ||
context_test.go | ||
context_unix.go | ||
context_windows.go | ||
dockerignore.go | ||
dockerignore_test.go | ||
git.go | ||
remote.go | ||
remote_test.go | ||
tarsum.go | ||
tarsum_test.go | ||
utils_test.go |