Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Add support for AWS ECR variant of RegistryAuthSupplier #1019

Closed
56quarters opened this issue May 14, 2018 · 2 comments
Closed

Add support for AWS ECR variant of RegistryAuthSupplier #1019

56quarters opened this issue May 14, 2018 · 2 comments

Comments

@56quarters
Copy link
Contributor

Much like there is a RegistryAuthSupplier for authenticating with Google's container repository, there could be an implementation that works with AWS ECR repositories. This implementation could make use of the AWS Java SDK to generate ECR credentials on the fly.

A rough sketch of the API would be...

public class AwsEcrRegistryAuthSupplier implements RegistryAuthSupplier {

    private final AmazonECR client;

    public AwsEcrRegistryAuthSupplier(AmazonECR client) {
        this.client = client;
    }

    @Override
    public RegistryAuth authFor(String imageName) throws DockerException {
        client.getAuthorizationToken(/* ... */)
        return null;
    }
    
    // ... other methods
}

Would you accept a pull request that added support for this using the existing ContainerRegistryAuthSupplier Google implementation as a model?

If this functionality was accepted, a follow up issue + PR would probably add use of it to the spotify/dockerfile-maven plugin.

Thanks!

56quarters pushed a commit to smarter-travel-media/docker-client that referenced this issue May 15, 2018
Allow authentication for images stored in AWS ECR repositories to be
generated on-the-fly using the AWS ECR client.

Fixes spotify#1019
56quarters pushed a commit to smarter-travel-media/docker-client that referenced this issue May 15, 2018
Allow authentication for images stored in AWS ECR repositories to be
generated on-the-fly using the AWS ECR client.

Fixes spotify#1019
@davidxia
Copy link
Contributor

See #1013 and #876.

@56quarters
Copy link
Contributor Author

Whoops, missed those PRs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants