You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a problem when trying to use the gradle buildBootImage task. I managed to track the source of the problem and it was a problem with my installation of docker which refused to allow a _ping.
But the symptom was not really clear as I only got the following message : Docker API version must be at least 1.41 to support the 'imagePlatform' option, but current API version is 1.24
I think this could be a good idea to add a log message when you get an exception when trying to ping the docker installation.
But after looking at DockerAPI and SystemAPI classes, I don't really know which form it could take :
classSystemApi {
SystemApi() {
}
/** * Get the API version supported by the Docker daemon. * @return the Docker daemon API version */ApiVersiongetApiVersion() {
try {
URIuri = newURIBuilder("/_ping").build();
try (Responseresponse = http().head(uri)) {
HeaderapiVersionHeader = response.getHeader(API_VERSION_HEADER_NAME);
if (apiVersionHeader != null) {
returnApiVersion.parse(apiVersionHeader.getValue());
}
}
catch (Exceptionex) {
// fall through to return default value// Add a way to log the exception here ?
}
returnMINIMUM_API_VERSION;
}
catch (URISyntaxExceptionex) {
thrownewIllegalStateException(ex);
}
}
}
The text was updated successfully, but these errors were encountered:
mhalbritter
changed the title
Introduce a way to log the error when retrieving the ApiVersion in spring-boot-buildpack-platform
Improve logging in DockerApi
Dec 10, 2024
I got a problem when trying to use the gradle
buildBootImage
task. I managed to track the source of the problem and it was a problem with my installation of docker which refused to allow a_ping
.But the symptom was not really clear as I only got the following message :
Docker API version must be at least 1.41 to support the 'imagePlatform' option, but current API version is 1.24
I think this could be a good idea to add a log message when you get an exception when trying to ping the docker installation.
But after looking at DockerAPI and SystemAPI classes, I don't really know which form it could take :
The text was updated successfully, but these errors were encountered: