GeezerVison is showing github.com — Docker Image for Apple Silicon · Issue #894 · ArcadeData/arcadedb
Docker Image for Apple Silicon #894Activitypsytron commented on Feb 25, 2023 potentially related: #795 lvca commented on Feb 28, 2023 lvca commented on Feb 28, 2023 gramian commented on Feb 28, 2023 CollaboratorAuthor More actions I tried this plugin with:
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${kubernetes-maven-plugin.version}</version>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<images>
<image>
<name>arcadedata/arcadedb</name>
<build>
<dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
<contextDir>${project.build.directory}/arcadedb-${project.version}.dir</contextDir>
<args>
<docker.buildArg.ARCH>arm64v8/,amd64/,winamd64/,arm32v7/</docker.buildArg.ARCH>
</args>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
</configuration>
in the package/pom.xml which fails with:
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.42.0:build (default) on project arcadedb-package: Unable to build image [arcadedata/arcadedb] : "COPY failed: no source files were specified"
The current maven plugin works for me locally with profile -Pdocker which produces a working docker image locally. lvca commented on Mar 1, 2023 How to generate also Apple Silicon? Is there a way to generate all the versions and deploy them to DockerHub? gramian commented on Mar 1, 2023 CollaboratorAuthor More actions I was hoping the list of platforms in docker.buildArg.ARCH would achieve this by building an image for each list member, then Apple Si would use arm64v8. Practically, I do not know, sorry; I could only test locally. adubkov commented on Mar 1, 2023 Just arm64 should work. In fact I build and running same image on both m1 pro and my local k8s setup on raspberry pi 4.
https://hub.docker.com/r/adubkov/arcadedb/tags
I build it with following command:
docker buildx build --push --platform linux/arm64 -t ${IMG_NAME} .
But you need to run some other command before use buildx it just I had it configured already. lvca commented on Mar 2, 2023 Correct, running docker build buildx works. I was able to publish both amd64 and arm64 on dockerhub:

Unfortunately, the maven plugin is pretty new, I wasn't able to figure out how to make this automatic by our CI (Github actions). lvca commented on Mar 20, 2023 Assigning both @gramian and @robfrank to this issue. Right now I can generate Apple Silicon image by running manually a command, but the final goal is to make this automatic. gramian commented on Mar 20, 2023 CollaboratorAuthor More actions My current contribution is an adapted package/pom.xml and an adapted Dockerfile package/src/main/docker/Dockerfile, with which architecture dependent local image builds work, but automated deploy needs testing.
Please note I am using a naive way of making shell calls via Maven since I could neither get the tested Docker nor Kubernetes Maven plugins to have separate build and deploy phases for images. From my point of view there are interlocking issues for each which prevent this.
PS: I started off: https://dzone.com/articles/build-docker-image-from-maven robfrank commented on May 14, 2023 I managaed to create a multiplatfrom image using the fabric8 docker maven plugin on this PR: #1070
Let e cleanup and verify that all is working fine, than I'll move the PR out of the draft status Reacted by Christian Himpe and Luca Garulli lvca commented on May 22, 2023 Thanks @robfrank we can close this issue now. Reacted by Roberto Franchini
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|