diff --git a/packages/cdk-assets/lib/private/docker.ts b/packages/cdk-assets/lib/private/docker.ts index f321bac3c11b6..ccaf077b72f70 100644 --- a/packages/cdk-assets/lib/private/docker.ts +++ b/packages/cdk-assets/lib/private/docker.ts @@ -271,9 +271,15 @@ 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 | undefined { + const isMac = os.platform() === 'darwin'; + if ( isMac ) return '/Applications/Docker.app/Contents/Resources/bin/docker' + else return +} \ No newline at end of file