I’m still learning docker and ECS but let’s say I ...
# aws
c
I’m still learning docker and ECS but let’s say I have an ECR repo and I’ve pushed my docker image there, what resources do I need to add in pulumi to be able to utilise the image? I’ve gotten as far as getting a load balancer set up with ssl cert. now I would like to point it at a docker app. I can’t use fargate as it’s a windows docker image.
b
If the app is just running on an ec2 instance then you will need to point your lb at that ec2 instance and give it the correct port security group to be able to access the container
w
I don’t know if this helps, but this example uses ECS with container instances: https://github.com/pulumi/examples/blob/aws-ecs-conatiner-instances-automation/aws-py-ecs-instances-autoapi/py-ecs-instance/__main__.py There are a number of moving parts to create an ECS cluster using container instances - including IAM roles, and the like.
c
i think that is exactly what i was looking for Mitch. I'll read through it carefully!
@witty-candle-66007: is the
container_definitions
section in the
TaskDefinition
where I would (somehow) point it to my docker app inside the EKR repo?
w
Yes. I believe you would specify your ECR-located image as per the “image” section on this page: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html
c
ok, perfect