You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kubernetes / Red Hat OpenShift setup and version : N/A (Not using Kubernetes, I just want to build Docker images)
If it's a bug, how to reproduce : Not a bug
If it's a feature request, what is your use case :
I am using a new MacBook Pro with Apple Silicon (M1 Max CPU, arm64 architecture).
I have to use some Docker base images for which there is unfortunately no native arm64 version available. This is no problem in principle; it's possible to run Docker containers for the amd64 architecture (= Intel x86_64) on this machine through Rosetta 2. (Note: Don't confuse the architecture names: arm64 = Apple Silicon, amd64 = Intel x86_64).
However: When I pull or build an image, Docker will by default try to pull or build an image for the native architecture (arm64). If no such image is available, it fails with an error message. It is possible to force Docker to use an image for the amd64 architecture by using the "--platform" option, for example: docker pull --platform linux/amd64 tagname
It seems that kubernetes-maven-plugin does not support supplying this option to Docker.
When I run Maven with --debug, I can see that the plugin parses this configuration correctly, but it seems it does not supply it to Docker because Docker still tries to pull the base image using the wrong architecture (arm64 instead of amd64).
I also added <apiVersion>1.41</apiVersion> to the plugin configuration. Note that platform is a supported query parameter in the Docker API v1.41.
But it still seems that kubernetes-maven-plugin does not pass this parameter to Docker.
Please make the plugin support this option, so that I can use it to build amd64 Docker images on my Apple Silicon MacBook Pro.
The text was updated successfully, but these errors were encountered:
Description
Info
mvn -v
) : 3.8.4I am using a new MacBook Pro with Apple Silicon (M1 Max CPU, arm64 architecture).
I have to use some Docker base images for which there is unfortunately no native arm64 version available. This is no problem in principle; it's possible to run Docker containers for the amd64 architecture (= Intel x86_64) on this machine through Rosetta 2. (Note: Don't confuse the architecture names: arm64 = Apple Silicon, amd64 = Intel x86_64).
However: When I pull or build an image, Docker will by default try to pull or build an image for the native architecture (arm64). If no such image is available, it fails with an error message. It is possible to force Docker to use an image for the amd64 architecture by using the "--platform" option, for example:
docker pull --platform linux/amd64 tagname
It seems that kubernetes-maven-plugin does not support supplying this option to Docker.
I tried using buildOptions as described in the documentation here: https://www.eclipse.org/jkube/docs/kubernetes-maven-plugin#jkube:build by adding this to the plugin configuration:
When I run Maven with --debug, I can see that the plugin parses this configuration correctly, but it seems it does not supply it to Docker because Docker still tries to pull the base image using the wrong architecture (arm64 instead of amd64).
I also added
<apiVersion>1.41</apiVersion>
to the plugin configuration. Note thatplatform
is a supported query parameter in the Docker API v1.41.But it still seems that kubernetes-maven-plugin does not pass this parameter to Docker.
Please make the plugin support this option, so that I can use it to build amd64 Docker images on my Apple Silicon MacBook Pro.
The text was updated successfully, but these errors were encountered: