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

cdk-assets: private ecr registry support overwrite any additional docker configuration #30743

Open
gyalai-aws opened this issue Jul 3, 2024 · 1 comment · May be fixed by #30750
Open

cdk-assets: private ecr registry support overwrite any additional docker configuration #30743

gyalai-aws opened this issue Jul 3, 2024 · 1 comment · May be fixed by #30750
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@gyalai-aws
Copy link

Describe the bug

  • We have a proxy configuration for docker in the ./docker/config.json file.
  • We are using private ecr to fetch our images which configuration is placed into the ~/.cdk/cdk-docker-creds.json file

The cdk-assets creates a new docker config file but it is only placing the contents of the ~/.cdk/cdk-docker-creds.json file and only the credHelpers property, so it is not even possible to include the proxy settings.

Expected Behavior

Both configuration should be respected.

Current Behavior

Only credentials are kept.

Reproduction Steps

see before.

Possible Solution

Change this line: https://github.com/aws/aws-cdk/blob/1fcef6309e54d7ec1e179c22a47a235b38fa1673/packages/cdk-assets/lib/private/docker.ts#L168C81-L168C92

Options:

  1. Write out the whole ~/.cdk/cdk-docker-creds.json file not just the credHelpers
  2. Add support to include additional ~/.cdk/cdk-docker*.json files to plug in additional docker configurations
  3. Check whenever a ~./docker/config.json file exists and merge both files.

Additional Information/Context

No response

CDK CLI Version

2.147.0

Framework Version

No response

Node.js Version

Any

OS

Any

Language

TypeScript

Language Version

No response

Other information

No response

@gyalai-aws gyalai-aws added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 3, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ecr Related to Amazon Elastic Container Registry label Jul 3, 2024
@khushail
Copy link
Contributor

khushail commented Jul 8, 2024

Thanks @gyalai-aws for reporting this and submission of PR.

@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr Related to Amazon Elastic Container Registry bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants