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

[ecs] ContainerImage.fromRegistry docs issue — how to use custom Docker image tag? #8964

Closed
zulhfreelancer opened this issue Jul 9, 2020 · 5 comments
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container documentation This is a problem with documentation. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1

Comments

@zulhfreelancer
Copy link

zulhfreelancer commented Jul 9, 2020

This is a 📕 documentation issue about ContainerImage.fromRegistry method where it's not clear how to supply a custom Docker image tag i.e. not-latest when using a public Docker image from Docker Hub.

When I was Googling around, I found this Medium post containing this line inside it:

ecs.ContainerImage.fromRegistry(“okaycloud/dummywebserver:latest”)

So, I assume, the method does actually support custom Docker image tag if it's separated by colon symbol i.e. image-name:tag-name but it wasn't made clear in the docs page.

Can someone confirm this? If it's correct, I'm happy to submit a PR to improve this section.

@zulhfreelancer zulhfreelancer added documentation This is a problem with documentation. feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 9, 2020
@SomayaB SomayaB changed the title ContainerImage.fromRegistry docs issue — how to use custom Docker image tag? [ecs] ContainerImage.fromRegistry docs issue — how to use custom Docker image tag? Jul 9, 2020
@SomayaB SomayaB added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Jul 9, 2020
@SoManyHs SoManyHs removed the needs-triage This issue or PR still needs to be triaged. label Jul 13, 2020
@el-veee
Copy link

el-veee commented Nov 12, 2020

I too would like guidance on this

@el-veee
Copy link

el-veee commented Nov 12, 2020

Note on the above ^^^ My CDK deployment which was failing when I was using "sonatype/nexus3" worked when I replaced it with "sonatype/nexus3:latest"

@MrArnoldPalmer MrArnoldPalmer added effort/small Small work item – less than a day of effort p1 labels Dec 7, 2020
@namedgraph
Copy link

I think an explicit tag() method would be clearer.

@pahud
Copy link
Contributor

pahud commented May 19, 2023

Closing this issue as we already clarified it in the latest example.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerImage.html

import * as cdk from 'aws-cdk-lib';
import * as efs from 'aws-cdk-lib/aws-efs';

declare const myFileSystem: efs.IFileSystem;

const jobDefn = new batch.EcsJobDefinition(this, 'JobDefn', {
  container: new batch.EcsEc2ContainerDefinition(this, 'containerDefn', {
    image: ecs.ContainerImage.fromRegistry('public.ecr.aws/amazonlinux/amazonlinux:latest'),
    memory: cdk.Size.mebibytes(2048),
    cpu: 256,
    volumes: [batch.EcsVolume.efs({
      name: 'myVolume',
      fileSystem: myFileSystem,
      containerPath: '/Volumes/myVolume',
    })],
  }),
});

@pahud pahud closed this as completed May 19, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container documentation This is a problem with documentation. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

No branches or pull requests

8 participants