Comments (12)
@ichasepucks : Thanks for reporting, I'll try to reproduce your issue via some GitHub action mac workflow
from docker-maven-plugin.
FWIW, I'm trying to have some colleagues reproduce this. So far, one with an Intel Mac and an old version of Docker, 20.10.12
and Maven 3.8.2
has this working.
from docker-maven-plugin.
If you look in your build listing you see buildx build --progress=plain --builder multiarch --platform linux/arm64
then later in the push listing you have buildx build --progress=plain --builder multiarch --platform linux/amd64,linux/arm64
I think plugin builds it for a single platform "linux/arm64" and later on it try to push as a multi platform image.
When I look in the plugin sources BuildXService:134 buildAndLoadSinglePlatform() there is only support for single platform at a time, while BuildXService:147 pushMultiPlatform() performs multiplatform push.
I actualy tryied to do a multiplatform build with the maven-plugin with a number of different configuration all accoding to the documentation but never suceeded and I connsider this a bug or a not yet supported fetaure.
from docker-maven-plugin.
What is needed here i to rewrite the BuildXService:134 buildAndLoadSinglePlatform()
to :
protected void buildAndLoadPlatforms(
List<String> buildX, String builderName, BuildDirs buildDirs,
ImageConfiguration imageConfig, String configuredRegistry, File buildArchive
) throws MojoExecutionException {
List<String> platforms = imageConfig.getBuildConfiguration().getBuildX().getPlatforms();
// "load" of multiplatform builds into the local image repo is not supported by docker v24.0.6
// single non native platform can be loaded and runed in dockers QEMU emulator
buildX(buildX, builderName, buildDirs, imageConfig, configuredRegistry,
platforms, buildArchive, platforms.size()==1 ? "--load" : null);
}
This was the easy part, then there are a number of test-cases that needs to be modified and adopted to the fact that multiplatform builds can be done and single platform builds don't need to be native.
from docker-maven-plugin.
After some iterations I finally understood how the plugin works and have åcome to a conclusion that that is works fine as it is, and reasons for it. The basic reason is that multiplatform images cant be loaded in your local docker repo you have on your machine. It only have support for single platform but it can actualy be a foreign platform. Later on when you run deploy it will rerun buildx ... -push
that builds the multiplatform image and pushes it upstreams.
This all works fine for me, so disregards all my previous comments.
from docker-maven-plugin.
Related Issues (20)
- filter doesn't work in conjunction with buildx HOT 2
- Allow configuring multiple wait urls for the start goal; basic authentication
- [Feature] Need a property to handle default file exclusions while building images HOT 3
- Multi-Platform build fails with OrbStack on MacOS HOT 2
- Failed to build the docker image on using "chmod" option
- Exception Access Violation caused by org.fusesource.jansi.AnsiConsole.ansiStream
- Volume binding bug in windows HOT 5
- Why docker:push actually builds the image HOT 2
- Add Documentation for `defaultExclusion` configuration property to `src/main/asciidoc/inc/external/_property_configuration.adoc`, too (mind the alphabetical order of the properties, too)
- plugin unable to authenticate with ECR credentials HOT 1
- Windows volume bindings do not work correctly with Rancher Desktop or Podman
- Remove `docker.nocache` system property HOT 2
- docker-maven-plugin cannot correctly execute dockerfile and build it correctly HOT 2
- Request for improved Documentation for dockerHost HOT 2
- Add feature for printing name of image HOT 2
- push fails with NullPointerException HOT 2
- TerserUtil.setElement does not actually respect multiple-cardinality elements HOT 1
- Can't clean all dangling images. HOT 3
- buildx support builds unwanted image with OS and architecture unkown/unknown HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-maven-plugin.