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
@@ -0,0 +1,11 @@
<?php
it('persists buildx metadata between the helper container and host cleanup', function () {
$sourceFile = file_get_contents(__DIR__.'/../../app/Jobs/ApplicationDeploymentJob.php');
expect($sourceFile)
->toContain('mkdir -p {$this->serverUserHomeDir}/.docker/buildx')
->toContain('-v {$this->serverUserHomeDir}/.docker/buildx:/root/.docker/buildx');
expect(substr_count($sourceFile, '{$buildxMetadataVolume} -v /var/run/docker.sock:/var/run/docker.sock'))->toBe(3);
});