I'm trying to run apache in a container and I need to set the tomcat server in a variable since tomcat container runs in a different namespace.
I've set the variable like this but it doesn't work. I've ensured that the variable is present by echoing it in the container and I can ping the host. Documentation says that we can set environment.
I'm not sure why it isn't working...
/etc/httpd/conf.d/workers.properties
worker.ajp13.port=8009
worker.ajp13.host="${TOMCAT_SERVER}"
worker.ajp13.type=ajp13
worker.ajp13.reply_timeout=15000
Figured it out. Had to use parentheses instead of curly braces. Found a example from this site.
Now I can pass the variable to docker run command like this..
docker run -e TOMCAT_SERVER=tomcat001 --name httpd -p 80:80 -d httpd:0.0.12