fix: replace docker compose with docker-compose on CSB

This commit is contained in:
Andras Bacsai 2022-08-15 09:27:54 +00:00
parent 68d06dcd19
commit c2c9d992e7

View File

@ -579,6 +579,11 @@ export async function executeDockerCmd({ dockerId, command }: { dockerId: string
} else {
engine = 'unix:///var/run/docker.sock'
}
if (process.env.CODESANDBOX_HOST) {
if (command.startsWith('docker compose')) {
command = command.replace(/docker compose/gi, 'docker-compose')
}
}
return await asyncExecShell(
`DOCKER_BUILDKIT=1 DOCKER_HOST="${engine}" ${command}`
);