ECS doesn't set port mapping

0

Hi, I'm trying to use EC2 to launch a Docker container On EC2, things work fine with

docker run -d -p 8080:8080 --name=apiserver <my docker id>

On ECS, I specified a port mapping in my task definition: Enter image description here

And when I SSH the ECS host I see my Docker running, but no port mapping is set Enter image description here

Why ECS isn't setting my port mapping??

1 Answer
0

Check your network mode as depending on it you may need to go modifications to the configuration: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#network_mode

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions