Akshay Deo
Akshay Deo

Reputation: 528

Adding portMappings to Dockerrun.aws.json with Single container configuartion

I am using ElasticBeanstalk with single docker container. I am using DataDog(statsd client) for pushing metrics from the docker container. I have a running datadog-agent which is technically a statsd client on the host machine. The issue I am facing is to connect that client running at port 8125 from the container.

What I have tried is:

  1. EXPOSE PORT 8125/udp in Dockerfile which obviously didn't work.
  2. Added Dockerrun.aws.json with
    {
      "AWSEBDockerrunVersion": "1",
      "portMappings": [
        {
          "hostPort": 8125,
          "containerPort": 8125
       }
     ]
    }
    But the issue is portMappings seems to added in V2 which is not available for single docker container.

Thanks in Advance

Upvotes: 1

Views: 776

Answers (1)

eolexe
eolexe

Reputation: 56

Try

{
    "AWSEBDockerrunVersion": "1",
    "Ports": [
        {
            "ContainerPort": "8125"
        }
    ]
}

Upvotes: 3

Related Questions