Is it possible to get the max memory of a docker container at runtime?
What I want to achieve is:
docker run --memory "100m"
and access the max memory in the docker file:
ENTRYPOINT ["java", "-Xmx$memory", "-jar", "helloworld.jar"]
Is it possible to get the max memory of a docker container at runtime?
What I want to achieve is:
docker run --memory "100m"
and access the max memory in the docker file:
ENTRYPOINT ["java", "-Xmx$memory", "-jar", "helloworld.jar"]
Don't think you can specify memory constraints in the Dockerfile yet. So the way to do it is to override your
entrypoint
at the command line: