-
Notifications
You must be signed in to change notification settings - Fork 4k
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-ecr): Expose repository domain or hostname #31631
Comments
If we examine Push commands for an ECR repository, the 1st step is to
So it is useful to expose a property, let's say /**
* The URI of this repository's registry:
*
* ACCOUNT.dkr.ecr.REGION.amazonaws.com
*
* @attribute
*/
readonly registryUri: string; Then introduce property below in RepositoryBase class: /**
* The URI of this repository's registry:
*
* ACCOUNT.dkr.ecr.REGION.amazonaws.com
*
*/
public get registryUri() {
const parts = this.stack.splitArn(this.repositoryArn, ArnFormat.SLASH_RESOURCE_NAME);
return `${parts.account}.dkr.ecr.${parts.region}.${this.stack.urlSuffix}`;
} |
@ashishdhingra Good point. Luckily, that command seems to work with the full |
Altho I'd be careful with the |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Describe the feature
Expose the repository domain/hostname as a prop.
Use Case
The Docker credentials helper (e.g.
docker-credential-ecr-login
) expects a hostname in the configuration.Docs: https://github.com/awslabs/amazon-ecr-credential-helper?tab=readme-ov-file#docker
Proposed Solution
Extract the hostname part from this method:
aws-cdk/packages/aws-cdk-lib/aws-ecr/lib/repository.ts
Lines 234 to 242 in 0c753c3
And make it public:
Other Information
This helper already ships with some CodeBuild images:
aws/aws-codebuild-docker-images#743
Acknowledgements
CDK version used
2.x
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: