docker-maven-plugin
docker-maven-plugin copied to clipboard
Multi-Arch Support: Build fails when a builder name was configured
Description
Following configuration
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<builderName>mybuilder</builderName>
</buildx>
</build>
</image>
</images>
</configuration>
</plugin>
leads to this command:
[INFO] DOCKER> docker --config /Users/.../target/docker/.../my-artifact/docker buildx build --progress=plain --builder mybuilder --platform linux/arm64 --tag 0.0.1 --tag latest --tag my-artifact --cache-to=type=local,dest=/Users/.../my-artifact/target/docker/.../my-artifact/cache --cache-from=type=local,src=/Users/.../target/docker/my-artifact/cache /Users/.../target/docker/.../my-artifact/build
which results in this error:
[INFO] DOCKER> error: open /Users/.../target/my-artifact/docker/buildx/instances/mybuilder: no such file or directory [ERROR] DOCKER> Error status (1) when building
Hi @Chr3is, Are you using the latest release or snapshot version?
Hey @viragtripathi, the builderName configuration was introduced due to this issue: https://github.com/fabric8io/docker-maven-plugin/issues/1551 It wasn't released yet so the bug can only be reproduced on the current master/snapshot
Thanks @Chr3is I was trying to use the buildx feature for Multi-Arch support following the samples then realized this hasn't been released yet. I guess I will wait for the release.
@viragtripathi It should be available now. Does it work with 0.40.1 for you ?