Docker is a tool used to build, deploy & run applications by using containers.
Suppose you have worked with spring boot application 2.2.4 but when you send your code to others they saying hey! code doesn't working man! In that case we need docker so that anyone can run the project without configuring the project again.