From c2f2e4f79d048557af57bc1a08c5b025a3bdb215 Mon Sep 17 00:00:00 2001 From: MD <19164817+damshenas@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:28:52 +0200 Subject: [PATCH] adding docker path in Mac --- packages/cdk-assets/lib/private/docker.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cdk-assets/lib/private/docker.ts b/packages/cdk-assets/lib/private/docker.ts index f321bac3c11b6..a87d21a723541 100644 --- a/packages/cdk-assets/lib/private/docker.ts +++ b/packages/cdk-assets/lib/private/docker.ts @@ -271,9 +271,14 @@ export class DockerFactory { } function getDockerCmd(): string { - return process.env.CDK_DOCKER ?? 'docker'; + return process.env.CDK_DOCKER ?? getDockerCmdMac() ?? 'docker'; } function flatten(x: string[][]) { return Array.prototype.concat([], ...x); } + +function getDockerCmdMac(): string { + const isMac = os.platform() === 'darwin'; + if ( isMac ) return '/Applications/Docker.app/Contents/Resources/bin/docker' +} \ No newline at end of file