Nesting variables in Apache config

I’m building a Docker-based Apache proxy, and I’d like the proxied port to be configurable.

I link the containers with --link ...:proxied, so Docker makes the environment variables PROXIED_PORT_80_TCP_ADDR and PROXIED_PORT_80_TCP_PORT. I used ProxyPass / "http://${PROXIED_PORT_80_TCP_ADDR}:${PROXIED_PORT_80_TCP_PORT}/" to reverse proxy to port 80.

  • Supervisord haproxy reload not working [closed]
  • Docker> postgresql9.6 error
  • eenvsubst not substitituing value for varable
  • configuring specific path under DocumentRoot to HTTPS of Apache server running on container
  • Executing docker command from a remote machine
  • How do apply Puppet class locally
  • I’d like the port to be configurable from the command line, when I start the container. I pass the variable as -e "PORT=...", and it is usable as ${PORT} in the Apache config.

    I’ve tried to nest the variables, like ${PROXIED_PORT_${PORT}_TCP_ADDR} without success, and also using the Define plugin, but still no luck.

  • How would I mount docker container filesystem?
  • Docker & Amazon Beanstalk - Deploy an Angular application
  • Bluemix - IBM Containers problems for US South?
  • Connecting IBM Containers (Dockers) to Watson IoT service instance
  • docker change cgroup driver to systemd
  • Invalid Message Format on Postgresql using Docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.