Am I missing something here? I don’t see any discrepancy in the configuration. Can anyone please point out what’s wrong here? Really appreciate your valuable suggestions. Thanks in advance!
Hmm, the problem is not originated in the base image:
me@docker~$ docker run -ti openjdk:11-jdk java -version
Unable to find image 'openjdk:11-jdk' locally
11-jdk: Pulling from library/openjdk
e4c3d3e4f7b0: Pull complete
101c41d0463b: Pull complete
8275efcd805f: Pull complete
751620502a7a: Pull complete
a59da3a7d0e7: Pull complete
9c0f1dffe039: Pull complete
474314d81831: Pull complete
Digest: sha256:d8af704f3022f5c44b4340c58e62313c706301915ec00291eec0749fc5378c3b
Status: Downloaded newer image for openjdk:11-jdk
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment 18.9 (build 11.0.9+11)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.9+11, mixed mode)
Your Dockerfile shows no indication of alteration of the java configuration either. No entrypoint scripts, thus no hidden actions.
What you observe is impossible with a fresh build image based on your Dockerfile.
Sure it is a fresh builld and not just an old image that happens to have the same name and tag?