Some of the best Docker practise for Java development are as follows:-
The things which you want to keep around, don’t store them on disk, instead use a backing service.
Also do not store logs in the container, use stdout or stderr or Syslog.
Assume your container will be scaled out or restarted; don't write code that can only run once or else corrupt your data.
Assume your container is ephemeral and can be destroyed at any time.
If you want to learn Docker then I would say you must take up the following Docker training Course. You can also watch the following Docker and Java videos to clear all your concepts regarding these two.
Docker video:
Java video: