I've created a custom homemade docker image containing the vhosts configuration, how can I define variables like ServerName
, DocumentRoot
in an ENV when running the container.
Thanks, really appreciate to all answers
I've created a custom homemade docker image containing the vhosts configuration, how can I define variables like ServerName
, DocumentRoot
in an ENV when running the container.
Thanks, really appreciate to all answers
You can use the
${APACHE_DOCUMENT_ROOT}
notation in the Apache config file.I took the example from this unanswered question:
A very basic Dockerfile:
Then I started the built container:
And it works.