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

RepositoryRef.repositoryUri doesn't get correct repository name when it's a/b #1272

Closed
mouyigang opened this issue Dec 2, 2018 · 1 comment

Comments

@mouyigang
Copy link

I have my ecr def like this:

    //ecr
    const myecr = new ecr.Repository(this, 'Myecr', {
      repositoryName: 'myecr/nginxlight'
    });

then I created a task def:

    fargateTaskdef.addContainer('Mycontainer', {
      image: ContainerImage.fromEcrRepository(myecr)
    }).addPortMappings({ containerPort: 80, hostPort: 80});

and granted permission to pull

    myecr.grant(fargateTaskdef.taskRole, 'ecr:*'); 

Task failed:


Status reason | CannotPullContainerError: API error (404): pull access denied for 347883428170.dkr.ecr.us-east-1.amazonaws.com/myecr, repository does not exist or may require 'docker login'

Expect:

If cdk allows create ecr like a/b, it should also allow task definition get the correct name.

@rix0rrr
Copy link
Contributor

rix0rrr commented Dec 3, 2018

You are correct. Related issue: #1232

This was fixed recently and will be released shortly.

Thanks for reporting.

@rix0rrr rix0rrr closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants