aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

aws-cdk-examples repo PR build is failing with an error - Cannot connect to the Docker daemon

Open VikramPatil-AMZ opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug

aws-cdk-examples repo PR build is failing while bundle Lambda function code using DOTNET_CORE_3_1.BundlingImage. build error message - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

As per online article, need to set privileged environment variable to true in the synth definition - https://docs.aws.amazon.com/cdk/api/v2/dotnet/api/Amazon.CDK.Pipelines.html#cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock (search for error message - "Cannot connect to the Docker daemon")

Expected Behavior

Lambda bundle command should bundle the code and PR build should pass.

Current Behavior

PR build is failing. Failed build job - https://github.com/aws-samples/aws-cdk-examples/actions/runs/3364394111/jobs/5578699844

Reproduction Steps

Re-run the PR build.

Possible Solution

As per online article, need to set privileged environment variable to true in the synth definition - https://docs.aws.amazon.com/cdk/api/v2/dotnet/api/Amazon.CDK.Pipelines.html#cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock (search for error message - "Cannot connect to the Docker daemon")

Additional Information/Context

No response

CDK CLI Version

2.X

Framework Version

.Net Core 3.1

Node.js Version

Not aware

OS

Not aware

Language

.NET

Language Version

No response

VikramPatil-AMZ avatar Oct 31 '22 21:10 VikramPatil-AMZ

The solution mentioned in https://docs.aws.amazon.com/cdk/api/v2/dotnet/api/Amazon.CDK.Pipelines.html#cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock is considered correct. However, this setting should be put in the SynthAction of the new CdkPipeline block in user's own code, instead of making changes in this aws-cdk-examples repo as it does not have any example code for creating AWS CodePipeline at the moment.

liyanone avatar Mar 16 '23 06:03 liyanone

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Dec 28 '24 23:12 github-actions[bot]