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 }}
Repository navigation
Cannot build multiarch in CI using buildx and DMP 0.43.3 #1701
While the new release 0.43.3 fixed the build problem on a Mac M1, it creates a new problem: multiarch builds using Buildx in a Github Action pipeline are no longer working after upgrading. Using an older version of the plugin, things are well in the CI (using 0.43.0 for quite some time now).
@poikilotherm : Thanks for reporting. Could you please share the difference in executed buildx commands in 0.43.0 and 0.43.3? 0.43.3 adds --config if auth credentials are not provided via docker config.
I'm spotting the difference that with 0.43.3, a parameter --node maven0 is added which wasn't present before and --config is not added in the second run with multiple platforms. (Though it is added in the build phase...? 🤔 )
@poikilotherm : What authentication method are you using? I had changed plugin behavior to not add --config when user is using docker login (since default value of config is ~/.docker/config.json) .
Change of --node maven0 was added since 0.43.2 . Do you face this issue just on 0.43.3 or 0.43.2? I think we can change the default value of --node parameter to null.
@rohanKanojia You're right that --node maven0 was added since 0.43.2 which is working fine for our CIs. But we met the similar issue that it's failed after upgrading from 0.43.2 to 0.43.3. This issue can be found only when building in platform linux/arm64
[INFO] DOCKER> error: open /root/.docker/buildx/instances/maven: no such file or directory
Error: DOCKER> Error status (1) when building
Looks like this is due to difference in docker CLI versions. Newer docker CLIs require --config option to be added always. Older docker CLIs (20.x) seem to be having problems with passing --config all the time
@jramosf : polite ping, Could you please share a reproducer project and the type of environment you're on? What difference do you see in executed docker commands when you run it with v0.43.0 and v0.43.4?
Apologies, did not see this. It's exactly the error you pasted above with Macs using Apple Silicon.
In case this helps anyone. I ran into this issue with these versions:
Docker version 24.0.5, build ced0996
Docker desktop 4.22.1 (118664)
I then upgraded to the latest and greatest 4.23.0 and 24.0.6 and that still didn't help.
A colleague had a setup that worked but was on an older version. One major difference was that he had this symlink. /usr/local/lib/docker/cli-plugins -> /Applications/Docker.app/Contents/Resources/cli-plugins
Once I created that symlink stuff started to work again. Not sure if this is correct or could end up masking other problems but I decided to put it out there... (I'm sure most people have cli-plugins living under ~/.docker/cli-plugins which symlink to the same directory under /Applications)
[INFO] DOCKER> docker buildx create --driver docker-container --name maven
[INFO] DOCKER> ERROR: existing instance for "maven" but no append mode, specify --node to make changes for existing instances
I tried to add manually the node name but no luck. It's not taken into account:
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<authConfig>
<push>
<username>${docker.push.username}</username>
<password>${docker.push.password}</password>
</push>
</authConfig>
<!-- Create multiple images -->
<images combine.self="override">
<image>
<external>
<type>properties</type>
<prefix>docker.noocr</prefix>
</external>
<build>
<buildx>
<nodeName>maven</nodeName>
</buildx>
</build>
</image>
<image>
<external>
<type>properties</type>
<prefix>docker.ocr</prefix>
</external>
<build>
<buildx>
<nodeName>maven</nodeName>
</buildx>
</build>
</image>
</images>
</configuration>
<executions>
<!-- Generate the docker images during the package phase -->
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<!-- Push the docker images during the "deploy" phase -->
<execution>
<id>docker-push</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
<execution>
<!-- There is no integration test, so we can skip that execution -->
<id>start-elasticsearch</id>
<phase>none</phase>
</execution>
<execution>
<!-- There is no integration test, so we can skip that execution -->
<id>stop-elasticsearch</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
This is still calling docker buildx create --driver docker-container --name maven with no node.
[INFO] DOCKER> docker buildx create --driver docker-container --name maven
[INFO] DOCKER> ERROR: existing instance for "maven" but no append mode, specify --node to make changes for existing instances
Could you please give a try to Docker Maven Plugin 0.44-SNAPSHOT and provide feedback on whether docker-maven-plugin is working as expected for your pipelines?
This was fixed in 0.44.0 (2024-02-17): the docker --config version-check workaround was reverted and a follow-up change copies the docker-buildx binary into the temporary config directory so docker still recognizes buildx after the config override (#1754).
@dadoonet already confirmed above that 0.44.0 resolves it, and the current release is 0.48.1, so this looks resolved.
Activity
rohanKanojia commentedon Aug 15, 2023
@poikilotherm : Thanks for reporting. Could you please share the difference in executed buildx commands in 0.43.0 and 0.43.3? 0.43.3 adds
--configif auth credentials are not provided via docker config.poikilotherm commentedon Aug 16, 2023
@rohanKanojia thx for the reply. Here are some outputs as requested.
0.43.0, taken from https://github.com/IQSS/dataverse/actions/runs/5866182102/job/15904575945:
0.43.3, taken from https://github.com/IQSS/dataverse/actions/runs/5860235371/job/15888066573:
I'm spotting the difference that with 0.43.3, a parameter
--node maven0is added which wasn't present before and--configis not added in the second run with multiple platforms. (Though it is added in the build phase...? 🤔 )rohanKanojia commentedon Aug 16, 2023
@poikilotherm : What authentication method are you using? I had changed plugin behavior to not add
--configwhen user is using docker login (since default value of config is~/.docker/config.json) .Change of
--node maven0was added since 0.43.2 . Do you face this issue just on 0.43.3 or 0.43.2? I think we can change the default value of--nodeparameter to null.fix (buildx) : Change default value of buildx node to null (fabric8io…
fix (buildx) : Change default value of buildx node to null (fabric8io…
fix (buildx) : Change default value of buildx node to null (fabric8io…
tomking1982 commentedon Aug 17, 2023
@rohanKanojia You're right that --node maven0 was added since 0.43.2 which is working fine for our CIs. But we met the similar issue that it's failed after upgrading from 0.43.2 to 0.43.3. This issue can be found only when building in platform linux/arm64
The only difference is that --config /tmp/**/docker was added before buildx
AWS authentication - https://dmp.fabric8.io/#extended-authentication which is our authentication method.
fix (buildx) : Change default value of buildx node to null (fabric8io…
rohanKanojia commentedon Aug 17, 2023
Looks like this is due to difference in docker CLI versions. Newer docker CLIs require
--configoption to be added always. Older docker CLIs (20.x) seem to be having problems with passing--configall the timefix (buildx) : Change default value of buildx node to null (fabric8io…
fix (buildx) : Change default value of buildx node to null (fabric8io…
fix (buildx) : Always pass --config option for latest versions of Doc…
fix (buildx) : Always pass --config option for latest versions of Doc…
12 remaining items
saravanaa14 commentedon Sep 5, 2023
no. All I'm saying is, this problem seems to be related to the plugin only.
docker --config /Users/ABCD/github/sample-project/target/docker/dockerhub.com/sample-project/sample-artifact-id/1.0.2-SNAPSHOT-20230905134913/docker buildx create --driver docker-container --name maven --config /Users/ABCD/github/sample-project/target/docker/buildkit.toml [INFO] DOCKER> unknown flag: --driver [INFO] DOCKER> See 'docker --help'. [INFO] DOCKER> [INFO] DOCKER> Usage: docker [OPTIONS] COMMANDIn this above command generated, if I remove
--configat the start of the line, the buildx instance is successfully getting created.rohanKanojia commentedon Sep 6, 2023
@saravanaa14 : Could you please share your docker CLI version?
saravanaa14 commentedon Sep 6, 2023
Docker version 24.0.5, build ced0996Docker desktop
4.22.1 (118664)jramosf commentedon Sep 6, 2023
Apologies, did not see this. It's exactly the error you pasted above with Macs using Apple Silicon.
tfactor2 commentedon Sep 15, 2023
Looks like we need to pass
--configafterdocker buildx.This works:
I had to create a config.json inside the docker folder, passing the docker folder as it's done by the plugin causes:
drcca commentedon Sep 20, 2023
In case this helps anyone. I ran into this issue with these versions:
Docker version 24.0.5, build ced0996
Docker desktop 4.22.1 (118664)
I then upgraded to the latest and greatest 4.23.0 and 24.0.6 and that still didn't help.
A colleague had a setup that worked but was on an older version. One major difference was that he had this symlink.
/usr/local/lib/docker/cli-plugins -> /Applications/Docker.app/Contents/Resources/cli-pluginsOnce I created that symlink stuff started to work again. Not sure if this is correct or could end up masking other problems but I decided to put it out there... (I'm sure most people have cli-plugins living under ~/.docker/cli-plugins which symlink to the same directory under /Applications)
dadoonet commentedon Oct 18, 2023
Hey
I'm getting the same issue when building a multiarch on macOS.
The same exact code with 0.43.2 is passing. Upgrading to 0.43.4 is failing.
I'm feeling that the error is coming from this change: a339536
To describe a bit more, I'm building 2 images.
With 0.43.2:
First image:
Second image:
With 0.43.4:
First image:
Second image:
Sounds like it was caused by this change: #1703
Some details about the versions I'm using:
I tried to add manually the node name but no luck. It's not taken into account:
This is still calling
docker buildx create --driver docker-container --name mavenwith no node.As a workaround, I'm switching back to 0.43.2.
Hope this helps.
Revert docker-maven-plugin upgrade to 0.43.4
changing docker-maven-plugin version. see: fabric8io/docker-maven-plu…
rohanKanojia commentedon Feb 12, 2024
@poikilotherm @dadoonet @drcca @tfactor2 @saravanaa14 : Hello, I've reverted some of my docker
--configrelated changes that I did in previous releases.Could you please give a try to Docker Maven Plugin 0.44-SNAPSHOT and provide feedback on whether docker-maven-plugin is working as expected for your pipelines?
rohanKanojia commentedon Feb 17, 2024
I've released 0.44.0 . I've tested it by building and pushing image to
ghcr.iousing buildx on Windows, MacOS (via GitHub action) and Linux.I think your issue might be fixed by this new release. I would appreciate it if you could try it out and provide feedback.
dadoonet commentedon Mar 1, 2024
This is indeed fixing my issue. Thanks a lot!
tholu commentedon Nov 12, 2024
@poikilotherm Do you have a working multiarch build in Github actions?
JamBalaya56562 commentedon Jun 28, 2026
This was fixed in 0.44.0 (2024-02-17): the
docker --configversion-check workaround was reverted and a follow-up change copies thedocker-buildxbinary into the temporary config directory so docker still recognizes buildx after the config override (#1754).@dadoonet already confirmed above that 0.44.0 resolves it, and the current release is 0.48.1, so this looks resolved.
@rohanKanojia this one can probably be closed.