docker-maven-plugin
docker-maven-plugin copied to clipboard
Docker build for arm
Description
Can I use fabric8 to build images that will be run on arm and x86 platforms? linux and mac?
I have tried doing
<buildOptions>
<platform>darwin/amd64</platform>
<platform>linux/arm64</platform>
</buildOptions>
- But because I am building it on a mac will the arm64 build work?
- When the image is pushed what is the distinguisher of the platforms? Are they tagged differently? What if i push it via docker push and not fabric8 then what?
Getting this when doing docker:build
"failed to get destination image \"sha256:7309dd2eeb8699ceb5194490cc4cbdd7f1b352f357a0ab2436793a47fc1186a8\": image with reference sha256:7309dd2eeb8699ceb5194490cc4cbdd7f1b352f357a0ab2436793a47fc1186a8 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64" ["failed to get destination image \"sha256:7309dd2eeb8699ceb5194490cc4cbdd7f1b352f357a0ab2436793a47fc1186a8\": image with reference sha256:7309dd2eeb8699ceb5194490cc4cbdd7f1b352f357a0ab2436793a47fc1186a8 was found but does not match the specified platform: wanted linux/arm64, actual: linux/amd64" ]
Info
- docker-maven-plugin version : 0.40.0
- Maven version (
mvn -v
) : Apache Maven 3.5.4 - Docker version : Docker version 20.10.17, build 100c701
<buildx>
<platforms>
<platform>linux/arm64</platform>
</platforms>
</buildx>
Changing to this does end up building the image but the inspect still shows "Architecture": "amd64", "Os": "linux",