Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-boot-maven-plugin sets imagePlatform even if it's empty #43424

Closed
wants to merge 1 commit into from

Conversation

vonZeppelin
Copy link
Contributor

A Docker image cannot be built with the spring-boot-maven-plugin:3.4.0 if Docker API version is less than 1.41. In particular, a Spring Boot project builds are failing in Bitbucket pipelines when no 'imagePlatform' option configured for the project with the following error

Docker API version must be at least 1.41 to support the 'imagePlatform' option, but current API version is 1.24

Using an empty <imagePlatform/> tag in the pom.xml doesn't help as Maven, most probably, assigns an empty string to the corresp. Java property.

The proposed fix is to check the config property for both null and empty string values.

@pivotal-cla
Copy link

@vonZeppelin Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@vonZeppelin Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 5, 2024
@mhalbritter mhalbritter self-assigned this Dec 5, 2024
@mhalbritter mhalbritter changed the title spring-boot-maven-plugin:3.4.0 requires Docker API 1.41+ to build a Docker image spring-boot-maven-plugin always sets imagePlatform Dec 5, 2024
@mhalbritter mhalbritter added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 5, 2024
@mhalbritter mhalbritter modified the milestones: 3.3.x, 3.4.x Dec 5, 2024
@mhalbritter mhalbritter changed the title spring-boot-maven-plugin always sets imagePlatform spring-boot-maven-plugin sets imagePlatform even if it's empty Dec 5, 2024
mhalbritter pushed a commit that referenced this pull request Dec 5, 2024
mhalbritter added a commit that referenced this pull request Dec 5, 2024
@mhalbritter
Copy link
Contributor

Thanks @vonZeppelin !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants