Hello, I’m trying to run a docker container to aws...
# aws
g
Hello, I’m trying to run a docker container to aws fargate, This is how I run the container in docker ->
docker run -p 80:3000 container-id
How do I add the container port 3000 it to the fargate task definition, currently I’m doing:
Copy code
const listener = new awsx.lb.ApplicationListener("pulumi-ecs-primary", {
  external: true,
  port: 80
});

const taskDefinition = new awsx.ecs.FargateTaskDefinition("sample", {
  containers: {
    sampleapp: {
      image: awsx.ecs.Image.fromDockerBuild(sample, {
        context: "./app/",
        dockerfile: "./app/Dockerfile",
      }),
      portMappings: [listener]
    },
  },
});
b
The docs mention this:
Copy code
const listener =
    new awsx.lb.NetworkTargetGroup("custom", { port: 8080 })
               .createListener("custom", { port: 80 });
g
Ok will check this, the docs a little confusing to browse through, thanks 😄
👍 1