Demo project for spring-projects/spring-boot#29756
To reproduce the issue, execute the following steps in order:
-
mvn clean package
Outcome: the image is built correctly, but not pushed.
Also, the following logs are shown:[WARNING] The property 'docker.credentials.username' is not set or it's blank, therefore no image will be pushed.
[WARNING] The property 'docker.credentials.password' is not set or it's blank, therefore no image will be pushed. -
mvn clean package -Ddocker.credentials.username=something
Outcome: the following logs are shown[WARNING] The property 'docker.credentials.password' is not set or it's blank, therefore no image will be pushed.
and the build failing with
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:build-image (build-image) on project demo: Execution build-image of goal org.springframework.boot:spring-boot-maven-plugin:2.6.3:build-image failed: Invalid Docker publish registry configuration, either token or username/password must be provided