patterndockerMinor
Use buildx in Jenkinsfile for platform specific build
Viewed 0 times
platformjenkinsfilebuildxforspecificusebuild
Problem
I'm currently building my docker image declaratively in a
Now I need to generate a platform specific build for ARM64.
For this purpose
must be used.
I there a way to keep using the
Or do I have to rewrite the syntax, if then how?
Jenkinsfile by:app = docker.build("...")Now I need to generate a platform specific build for ARM64.
For this purpose
docker buildx build --platform linux/arm64 ...must be used.
I there a way to keep using the
docker.build() syntax and still generate a platform specific image?Or do I have to rewrite the syntax, if then how?
Solution
The Jenkins Docker Pipeline plugin does not support
Jeremie Drouet wrote a great post "Multi-arch build and images, the simple way" which covers the underlying ways you can do it by building images first, then create a manifest to link them together.
bgulla on Github has a gist that does as much of the build as possible with pipeline using
buildx (yet?). Voting may help, so add yours to the issue if so inclined.Jeremie Drouet wrote a great post "Multi-arch build and images, the simple way" which covers the underlying ways you can do it by building images first, then create a manifest to link them together.
bgulla on Github has a gist that does as much of the build as possible with pipeline using
docker.withRegistry(). Then uses sh to create and push the manifest.Context
StackExchange DevOps Q#15267, answer score: 2
Revisions (0)
No revisions yet.