Open adamish opened 3 years ago
Something like that would be enough (minimal invasive):
public String buildImageId() {
// stream messages end with new line, so call trim to remove it
final String stream = stream();
if (stream == null) return null;
String IMAGE_ID_PREFIX = "Successfully built ";
int index = stream.indexOf(IMAGE_ID_PREFIX);
return index >= 0
? stream.substring(index + IMAGE_ID_PREFIX.length()).trim()
: null;
}
instead of the https://github.com/spotify/docker-client/blob/v8.16.0/src/main/java/com/spotify/docker/client/messages/ProgressMessage.java#L116-L122:
public String buildImageId() {
// stream messages end with new line, so call trim to remove it
final String stream = stream();
return stream != null && stream.startsWith("Successfully built")
? stream.substring(stream.lastIndexOf(' ') + 1).trim()
: null;
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
This lies between bug request / feature. As it stands RHEL 8 no longer supports docker, instead docker-podman is recommended. Theoretically this is a drop-in replacement for docker. However when podman is used with dockerfile-maven it fails to build images.
How to reproduce
Use dockerfile-maven plugin with docker-podman
What do you expect
Build should be success
What happened instead
Maven reports build failure stating
It appears underlying image build was successful...
I've taken liberty of debugging this. The "problem" occurs in com.spotify.docker.client.messages.ProgressMessage.buildImageId() This method expects a String that starts with "Successfully built", however the string that is received contains lots of lines of data before this
Software:
Full backtrace