I am learning Docker and try to build one of my first images not according Docker docs. I heard spring-boot-maven-plugin can build images specifically for docker.
So I just opened MINGW64 terminal and navigated to my Spring Boot project root directory that has pom.xml.
I have tested whether my application works in a production mode when working directory is \target\. Website runs on tomcat.
So I just launched command mvn spring-boot:build-image
And maven started to build an image. But it did not finished. It stucked onto [INFO] Building image 'docker.io/library/maitinimas01image:latest' process.
I need help. maybe any of you know what is wrong and how can I build an image? Docker Desktop version 4.16.2 (95914) is running. When I open an extra console and type command docker --version I do not get any response. Process is also stuck. I have to end with ctrl+c.
I tried to launch maven in debug mode ... -X ...
and look at the terminal window:
Having the same issue and also I am new to docker. While saving the image it just hangs and stay like this forever. On the other hand, on creating a new application without dependencies, it saves the image successfully. Wondering what is going on here!
There are new ways of building images. You have to build images separately for React then for Spring Boot and also for database. React and Spring Boot must have Dockerfile’s inside. And 1 folder higher - root folder that contains frontend and backend there should be docker-compose.yml.
Check this out: Deploying a React Spring Boot App with Docker Part I - YouTube
Dude on YouTube shows how to do it right.
I solved the issue somehow by adding docker.io before the image name, like in your case try this: docker.io/sumittambat/currency-exchange-${project.artifactId}:${project.version} (don’t forget to run mvn clean install once done editing your pom.xml file)
Also if possible try cleaning your docker daemon or resetting to factory defaults, this worked for me.