Created
December 14, 2020 14:10
-
-
Save Voronenko/9f6cb5427fb55e4b740523c0c45994cb to your computer and use it in GitHub Desktop.
Basic illustration of docker support in jdk 11 container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it openjdk:11-jdk bash | |
root@3411b7f04046:/# java -XX:+PrintFlagsFinal -version | grep ContainerSupport | |
bool UseContainerSupport = true {product} {default} | |
root@3411b7f04046:/# jshell | |
jshell> Runtime.getRuntime().availableProcessors() | |
$1 ==> 8 | |
jshell> Runtime.getRuntime().totalMemory() | |
$2 ==> 264241152 | |
$ docker run -it --cpus 2 --memory 1G openjdk:11-jdk | |
jshell> Runtime.getRuntime().availableProcessors() | |
$1 ==> 2 | |
jshell> Runtime.getRuntime().totalMemory() | |
$2 ==> 16252928 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment