-
Notifications
You must be signed in to change notification settings - Fork 642
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
Plugin doesn't abort building an image in case Podman is used and the Dockerfile can't be processed #1512
Comments
jh-cd
changed the title
Plugin doesn't abort the build in case the Dockerfile can't be processed when building remote
Plugin doesn't abort the build when building remote in case the Dockerfile can't be processed
Dec 19, 2021
jh-cd
changed the title
Plugin doesn't abort the build when building remote in case the Dockerfile can't be processed
When building remote, the plugin doesn't abort the build in case the Dockerfile can't be processed
Dec 20, 2021
jh-cd
changed the title
When building remote, the plugin doesn't abort the build in case the Dockerfile can't be processed
Plugin doesn't abort building an image in case Podman is used and the Dockerfile can't be processed
Feb 3, 2022
@jh-cd : Hi, Do you plan to contribute a fix upstream for this issue? |
@rohanKanojia Yes, I created PR #1585. |
rohanKanojia
pushed a commit
that referenced
this issue
Jul 31, 2022
…sed and the Dockerfile can't be processed Signed-off-by: Johannes Heger <johannes.heger@comdirect.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Short:
Podman's response for POST /build lacks of header "Content-Type: application/json".
Long:
When triggering a build, docker-maven-plugin sends a POST /build request and checks the response.
The response is 200 OK despite the build result, so docker-maven-plugin checks for errors in the response's content.
It does this by checking the headers for "Content-Type: application/json". If given, it checks if the response contains an "error" object. If present, docker-maven-plugin raises an exception to stop the Maven build.
The code in HcChunkedResponseHandlerWrapper is:
And the handler BuildJsonResponseHandler is:
In case Podman is used, no "Content-Type: application/json" is given, nor any "Content-Type" at all. docker-maven-plugin won't parse the response-content for errors, and won't raise an exception to stop the Maven build.
A workaround is needed.
Versions
Maven:
Plugin:
Podman:
podman version 3.4.2
The text was updated successfully, but these errors were encountered: