I created an AWS Elastic Beanstalk environment with a Load Balancer configured on ports 80 and 8080, I also turned off proxy (was Nginx initially). I created simple Node.js app and Dockerfile for it. Also I added file Dockerrun.aws.json with content:

  "AWSEBDockerrunVersion": "1",
  "Ports": [
      "HostPort": "8080",
      "ContainerPort": "8080"

I have my own image, not published anywhere so I didn't mentioned the Image section. After deployment I see one Docker container running with a single port 8080 opened (as expected). But the Elastic Beanstalk system doesn't forward this port to internal IP address.

What am I doing wrong and how to instruct Elastic Beanstalk to forward port from container to host (I know how to do it manually but it is not the case for Elastic Beanstalk) ?

  • did you expose the port 8080 in the Dockerfile? – G. I. Joe Aug 18 '20 at 0:40

I had the same problem in a rails container (port 3000 using puma) by default rails server only binds localhost to the listening interface, I had to use -b option to bind and that solved the problem.

In react I have no the same problem cause npm serve package binds all interfaces by default

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.