Injecting the elastic beanstalk server URL into the node.js configuration using Docker

I have a Single Container Docker Elastic Beanstalk instance running my-server node.js web server application. Elastic Beanstalk gives the server URL like http://my-server.qwe8z32qw3.us-west-1.elasticbeanstalk.com.

My node.js server sends information to another service, so I want to indicate the information is coming from that server URL and I want to give the service an html link directly to my-server.

  • Docker refusing to run bash
  • Docker integration in OpenShift
  • golang:sshfs -o reconnect fails when used inside docker container with “reading directory .: Input/output error”
  • Docker: listen for .sql changes and re-provision database
  • Error on Zookeeper cluster mode with Docker?
  • Unable to browse nodejs web app running docker container
  • So my node.js application would like to know it’s server URL.

    Is there a way to inject the server URL or server hostname my-server.qwe8z32qw3.us-west-1.elasticbeanstalk.com into the docker host so I can get to it with a ebextension script?

    Or is there another way?

  • Separating dependencies for Celery container from Django container
  • Docker container with Python Web App - Connect to Postgres on Host machine (OSX)
  • How does Docker allow portable containers if the Kernel libraries change
  • How to pass parameters to a .net core project with dockerfile
  • docker-compose link container of another docker-compose
  • How to mimic a “Docker containers behind reverse-proxy or load balancer setup” during development
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.