Today, a project was pulled from the Docker official website and an error was reported when using Windows Docker Desktop to build a mirror image:
It's really bad, it's ok to test on a Mac. There is a big circle of Baidu and Google, some say it is a permission problem, some say it is a line break problem, after all, it is too troublesome! But I can be sure that the reason is almost the reason for the line break!
Solution:
Finally, I rebuilt a new Maven project through Ali's SpringBoot scaffolding, and took out the mvnw and other files inside to replace the files in the original project. The replacement list:
mvnw
mvnw.cmd
.mvn/
Then re-docker build... that's it!
As shown in the picture (in fact, in theory, only mvnw is needed, for the sake of insurance):