Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
VikramPatil-AMZ opened this issue Oct 31, 2022 · 1 comment
Labels
bug This issue is a bug. language/dotnet Related to .NET examples needs-triage This issue or PR still needs to be triaged. p1

Comments

@VikramPatil-AMZ
Copy link
Contributor

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 VikramPatil-AMZ added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 31, 2022
@liyanone
Copy link

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.

@kaiz-io kaiz-io added language/dotnet Related to .NET examples p1 labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. language/dotnet Related to .NET examples needs-triage This issue or PR still needs to be triaged. p1
Projects
None yet
Development

No branches or pull requests

3 participants