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
{{ message }}
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
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
"java.lang.IllegalStateException: Could not acquire image ID or digest following build"
It appears underlying image build was successful...
"[INFO] Successfully built 2d636e47efb5222571aadedc23eb0419788f585cefd6186da5d25c728aafe6ca"
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
Version: 1.9.3
RemoteAPI Version: 1
Go Version: go1.13.4
OS/Arch: linux/amd64
Spotify's dockerfile-maven version: 1.4.13
Full backtrace
Caused by: java.lang.IllegalStateException: Could not acquire image ID or digest following build
at com.spotify.docker.client.shaded.com.google.common.base.Preconditions.checkState (Preconditions.java:444)
at com.spotify.docker.client.DefaultDockerClient$BuildProgressHandler.getImageId (DefaultDockerClient.java:305)
at com.spotify.docker.client.DefaultDockerClient$BuildProgressHandler.access$1200 (DefaultDockerClient.java:294)
at com.spotify.docker.client.DefaultDockerClient.build (DefaultDockerClient.java:1501)
at com.spotify.docker.client.DefaultDockerClient.build (DefaultDockerClient.java:1465)
at com.spotify.plugin.dockerfile.BuildMojo.buildImage (BuildMojo.java:240)
at com.spotify.plugin.dockerfile.BuildMojo.execute (BuildMojo.java:135)
at com.spotify.plugin.dockerfile.AbstractDockerMojo.tryExecute (AbstractDockerMojo.java:265)
at com.spotify.plugin.dockerfile.AbstractDockerMojo.execute (AbstractDockerMojo.java:254)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
The text was updated successfully, but these errors were encountered:
Something like that would be enough (minimal invasive):
publicStringbuildImageId() {
// stream messages end with new line, so call trim to remove itfinalStringstream = stream();
if (stream == null) returnnull;
StringIMAGE_ID_PREFIX = "Successfully built ";
intindex = stream.indexOf(IMAGE_ID_PREFIX);
returnindex >= 0
? stream.substring(index + IMAGE_ID_PREFIX.length()).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
The text was updated successfully, but these errors were encountered: