I deploy this project in CircleCI using a container-based executor (no Docker daemon available). I use the following command:
overrideWarningsEnabled=false npx cdk deploy v7-Stack \
--parameters DeployDemoUIParameter=No \
--parameters LogRetentionPeriodParameter=${LOG_RETENTION} \
--parameters CloudFrontPriceClassParameter=PriceClass_100 \
--parameters AutoWebPParameter=Yes \
--parameters CorsEnabledParameter=Yes \
--parameters CorsOriginParameter="${CORS_ORIGINS}" \
--parameters SourceBucketsParameter=${SOURCE_BUCKET} \
--profile ${ENVIRONMENT} \
--require-approval never
Even though I'm only deploying v7-Stack, CDK synthesizes all stacks in the app — including v8-Stack, which contains a DockerImageAsset. This triggers a docker build during synthesis and fails in environments without Docker:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
v7-Stack: fail: docker build --tag cdkasset-febb4e1b263361e89ae71e47ca4a8de2c65388a5534fe76f71760e44e2685d9a --file Dockerfile --platform linux/amd64 .
exited with error code 1
I can work around this by switching to a VM executor with Docker available, but it feels unnecessary since I only need v7-Stack.
Is there a recommended way to deploy just v7-Stack without triggering the v8 Docker build? For example, would it be possible to split the stacks into separate CDK apps, or add a context flag to conditionally skip v8-Stack instantiation?
I deploy this project in CircleCI using a container-based executor (no Docker daemon available). I use the following command:
overrideWarningsEnabled=false npx cdk deploy v7-Stack \ --parameters DeployDemoUIParameter=No \ --parameters LogRetentionPeriodParameter=${LOG_RETENTION} \ --parameters CloudFrontPriceClassParameter=PriceClass_100 \ --parameters AutoWebPParameter=Yes \ --parameters CorsEnabledParameter=Yes \ --parameters CorsOriginParameter="${CORS_ORIGINS}" \ --parameters SourceBucketsParameter=${SOURCE_BUCKET} \ --profile ${ENVIRONMENT} \ --require-approval neverEven though I'm only deploying v7-Stack, CDK synthesizes all stacks in the app — including v8-Stack, which contains a DockerImageAsset. This triggers a docker build during synthesis and fails in environments without Docker:
I can work around this by switching to a VM executor with Docker available, but it feels unnecessary since I only need v7-Stack.
Is there a recommended way to deploy just v7-Stack without triggering the v8 Docker build? For example, would it be possible to split the stacks into separate CDK apps, or add a context flag to conditionally skip v8-Stack instantiation?