As of raising this question, Docker looks to be new enough to not have answers to this question on the net. The only place I found is this article in which the author is saying it is hard, and that's it.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
It all depends how your Java application is packaged and how it's configuration files are exposed using Docker.
For example the official tomcat image states that the configuration file is available in the default location: /usr/local/tomcat/conf/
So easy to override entire directory or just one configuration file:
I agree that it depends on what container you're using. If you are using the official Tomcat image, it looks like it's simple enough, you will need to pass the
JAVA_OPTS
environment variable with your heap settings:See How to set JVM parameters?
Note that in a
docker-compose.yml
file - you'll need to leave out the double-quotes:or
You can also just place those settings in your image so something like the following would exist in your Dockerfile: