Skip to content
This repository was archived by the owner on Mar 31, 2022. It is now read-only.
This repository was archived by the owner on Mar 31, 2022. It is now read-only.

Incompatibility with podman-docker #370

@adamish

Description

@adamish

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

"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

--> 114aeadc56b
114aeadc56b1ba07e52ead49a69935c4cb89e44e9d7aeb86584e07c967444b4b
<various docker instructions, RUN, ADD etc>
COMMIT localhost
Successfully built 114aeadc56b1ba07e52ead49a69935c4cb89e44e9d7aeb86584e07c967444b4b

Software:

  • podman version
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions