-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker error for multi-arch build #1678
Comments
There are quite a few issues (see #1583, #1643 for example), which all seem to boil down to the same problem. Some propose to simply remove the I figured, that the reason why this fails on some (!) Docker setups, seems to be the following:
As there is no Unfortunately, this behavior is non consistent with different Docker installations. Conclusion: |
Problem resolved! Beware: The following may or may not apply to Docker Desktop on macos only. I discovered, that Docker Desktop is using an additional path to resolve plugins: So finally: This might help: docker/cli#1534 |
i just discovered with a collegue that it appears to be a problem on apple m2, since he has the m1 model. We checked out and build https://github.com/fabric8io/docker-maven-plugin/tree/master/samples/multi-architecture and for him it works, for me doesn't. uncertain if this helps, tho. cheers |
Thanks for your insightful comments @jdelker @janpauldahlke Update: After facing this issue and being unable to resolve it, I moved on to trying another plugin. However, due to facing some issues with that plugin too, I moved back to testing this one and it worked this time. Simply updating docker with Although, when I try to run it in an interactive env using Edit: setting the tag |
With this new version, a problem on M1 MACs not being able to build with Docker because of a non-existing config file was worked around by the DMP devs. See also: fabric8io/docker-maven-plugin#1678
With this new version, a problem on M1 MACs not being able to build with Docker because of a non-existing config file was worked around by the DMP devs. See also: fabric8io/docker-maven-plugin#1678
The solution for me with homebrew used to install docker on M1 brew install docker docker-compose docker-buildx docker-credential-helper sudo mkdir -p /usr/local/lib/docker
sudo ln -sfn /opt/homebrew/lib/docker/cli-plugins /usr/local/lib/docker/cli-plugins |
Description
Info
mvn -v
) : 3.8.6I am using the docker-maven-plugin for a multi-architecture
linux/amd64,linux/arm64
build using an external Dockerfile.I have defined the plugin in the pom.xml file in the following manner:
My workflow is in the following manner:
I start the build on an x86 server. The application is built and deployed using jenkins with the command
mvn clean package docker:build -Ddocker.platforms=linux/amd64,linux/arm64
.I get the following error while building:
[ERROR] DOCKER> Error status (125) while creating builder maven
Error
I think the error is due to this:
docker --config /var/lib/jenkins/workspace/Application/target/docker//Application/docker buildx create --driver docker-container --name maven
[INFO] DOCKER> unknown flag: --driver
It's trying to create a builder
maven
using the config file defined in the path/var/lib/jenkins/workspace/Application/target/docker/<ECR REPO URL>/Application/docker
. I wish to know if there is a way to disable using the config file for creating builder, or how I can change the config file path for the builder.I also tried creating a test builder using
<builderName>test_builder</builderName>
in thebuildx
tag, as given in the docs, however, I am unable to change the config file for the same. It's not necessary to provide a config file while creating a builder and I wish to do that.Also, the error is
unknown flag --driver
which is strange, considering I was able to create the test_builder usingdocker buildx create --name test_builder --driver docker-container --bootstrap
.The text was updated successfully, but these errors were encountered: