Is it possible to get maximum docker container memory at runtime?
What I want to achieve:
docker run --memory "100m"
and access the maximum memory in the docker file:
ENTRYPOINT ["java", "-Xmx$memory", "-jar", "helloworld.jar"]
Do not think that you can still specify memory limits in the Docker file. So the way to do this is to override entrypoint on the command line:
entrypoint
$ docker run -i -t --memory "100m" --entrypoint "java -Xmx100m -jar helloworld.jar" example/java-hello
Source: https://habr.com/ru/post/1239801/More articles:Safari console configuration error when sourcemap is unavailable? - firefoxHow to encode "press the key to continue" - ruby | fooobar.comHow to apply hidden / remote source map in Safari? - javascriptmain heading in grid.arrange or organizGrob has gray background - rAutomatically configure Java to use the maximum RAM allocated for its Docker container - javaWebpack requires dynamic image in the React component - imageHiding the panel should make the controls below move up and resize the form - c #add build parameter to jenkins build schedule - jenkinsHow to change only topic (CN) in existing csr - opensslTeamCity shows fewer tests that have passed lengthy similar test names due to pruning - unit-testingAll Articles