Skip to content

Makefile: prune build-cache before building#40884

Closed
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:prune_buildcache
Closed

Makefile: prune build-cache before building#40884
thaJeztah wants to merge 1 commit intomoby:masterfrom
thaJeztah:prune_buildcache

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented May 1, 2020

temporarily based on top of #40893

Setting a conservative "12h" limit on this for now (only build-cache
that's older than 12 hours will be removed)

Possibly this helps with the ppc64le machines running out of disk space

@cpuguy83 @StefanScherer ptal

@thaJeztah thaJeztah added status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels May 1, 2020
@thaJeztah
Copy link
Copy Markdown
Member Author

Arf;

[2020-05-01T15:48:39.607Z] docker builder prune -f --filter until=12h
[2020-05-01T15:48:39.891Z] unknown shorthand flag: 'f' in -f

The powerpc64le machines are still running Docker 18.06;

+ docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:26:10 2018
 OS/Arch:           linux/ppc64le
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:24:20 2018
  OS/Arch:          linux/ppc64le
  Experimental:     true

@thaJeztah thaJeztah force-pushed the prune_buildcache branch from 19497f7 to cad09bb Compare May 2, 2020 17:13
@thaJeztah thaJeztah changed the title Makefile: prune build-cache as part of "clean-cache" Makefile: prune build-cache as part of "clean-cache", and update buildx v0.4.1 May 2, 2020
@thaJeztah thaJeztah marked this pull request as draft May 2, 2020 17:13
@thaJeztah thaJeztah force-pushed the prune_buildcache branch from cad09bb to a7b5fec Compare May 2, 2020 23:43
@thaJeztah
Copy link
Copy Markdown
Member Author

Hmmm looks like buildx is gone before we reach the make clean? weird


[2020-05-03T00:10:05.701Z] + make clean
[2020-05-03T00:10:06.000Z] make: command: Command not found
[2020-05-03T00:10:06.000Z] make: command: Command not found
[2020-05-03T00:10:06.000Z] make: command: Command not found
[2020-05-03T00:10:06.000Z] docker volume rm -f docker-dev-cache
[2020-05-03T00:10:06.298Z] docker-dev-cache
[2020-05-03T00:10:06.298Z] prune --force --filter until=12h
[2020-05-03T00:10:06.298Z] make: prune: Command not found
[2020-05-03T00:10:06.298Z] Makefile:200: recipe for target 'clean-cache' failed
[2020-05-03T00:10:06.298Z] make: *** [clean-cache] Error 127
script returned exit code 2

@thaJeztah thaJeztah force-pushed the prune_buildcache branch from a7b5fec to 24547f9 Compare May 4, 2020 14:19
@thaJeztah thaJeztah changed the title Makefile: prune build-cache as part of "clean-cache", and update buildx v0.4.1 Makefile: prune build-cache before building, and update buildx v0.4.1 May 4, 2020
@thaJeztah thaJeztah changed the title Makefile: prune build-cache before building, and update buildx v0.4.1 Makefile: prune build-cache before building Jul 27, 2021
Setting a conservative "12h" limit on this for now (only build-cache
that's older than 12 hours will be removed)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah closed this Oct 17, 2025
@thaJeztah thaJeztah deleted the prune_buildcache branch October 17, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant