I have a Docker container specified through Dockerfile which has to be run with the -p
flag in order to function properly. On my local machine, after running
docker run -d -p 5000:5000 blagtagger:v0.4.3
the port mapping is shown as 0.0.0.0:5000->5000/tcp
and everything works smoothly.
Now, I need to deploy it on AWS Elastic Beanstalk, so I prepared my Dockerrun.aws.json
file as follows:
{
"AWSEBDockerrunVersion": "1",
"Ports": [
{
"ContainerPort": 5000,
"HostPort": 5000
}
]
}
However, the container port does not seem to map to the host port correctly. The port mapping is shown as 5000/tcp
.
How can I ask Beanstalk to set the mapping to 0.0.0.0:5000->5000/tcp
?