docker-library/tomcat

Suggested syntax in Dockerfile for $PORT?

charlesdwright opened this issue · 6 comments

Perhaps the documentation can show an example of how to create a new image allowing for a $PORT environment var using this one.

Just curious, what's this?

    <init-param>
      <param-name>expires</param-name>
      <param-value>666</param-value>
    </init-param>

#169 (comment)

it requires modification of XML configuration to change the port -- we currently do not do anything to the default XML configuration provided by Tomcat upstream, and we don't have any plans to do so.

And that snippet looks like an ssl expiry parameter

You would need to provide a modified server.xml that can substitute the value for the environment variable
https://stackoverflow.com/a/15556920

It seems unnecessary when you can just have Docker forward whichever port you want to the container (which is listening on port 8080 by default)
https://docs.docker.com/config/containers/container-networking/#published-ports
https://github.com/docker-library/docs/tree/master/tomcat#how-to-use-this-image

You could also try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum