fix(deploy): persist Railpack buildx metadata

Mount the host buildx metadata directory into helper containers so the
Railpack builder can be pruned during Docker cleanup.
This commit is contained in:
Andras Bacsai
2026-06-02 14:30:49 +02:00
parent 40294bc3b3
commit 5eec212ade
4 changed files with 25 additions and 4 deletions
@@ -447,6 +447,14 @@ it('container prune excludes persistent resource types', function () {
expect($sourceFile)->toContain('label=coolify.managed=true');
});
it('uses persisted buildx metadata when pruning the railpack builder', function () {
$sourceFile = file_get_contents(__DIR__.'/../../../../app/Actions/Server/CleanupDocker.php');
expect($sourceFile)
->toContain('BUILDX_CONFIG=$HOME/.docker/buildx docker buildx prune --builder coolify-railpack -af')
->not->toContain('--buildkitd-flags');
});
it('preserves build image for currently running tag', function () {
$images = collect([
['repository' => 'app-uuid', 'tag' => 'commit1', 'created_at' => '2024-01-01 10:00:00', 'image_ref' => 'app-uuid:commit1'],