If you're distributing your image in any way / creating copies etc. then you do
Distributing means giving the built artifact to a 3rd party.
Yes, you can create your own JDK docker base image. Yes, you can deploy it at will on any of your systems. No, you can't push it to a public respository for other people to use.