Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ARM container images #448

Open
voron opened this issue Apr 29, 2023 · 4 comments · May be fixed by #481
Open

Add support for ARM container images #448

voron opened this issue Apr 29, 2023 · 4 comments · May be fixed by #481
Projects

Comments

@voron
Copy link

voron commented Apr 29, 2023

There is no arm container images available

docker pull kubesec/kubesec 
...
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.

It will be good to have ones to use docker version on Apple M1/M2

@controlplane-bot controlplane-bot added this to To Do in Kubesec Apr 29, 2023
@Paken
Copy link

Paken commented May 9, 2023

Looking forward to this one too.

@zanhsieh
Copy link

zanhsieh commented Jun 12, 2023

For folks can't wait, here is the cli steps:

cd /path/to/kubesec
docker buildx create --name mybuilder --driver docker-container --bootstrap
docker buildx use mybuilder
docker buildx build --platform linux/amd64,linux/arm64,linux/amd64/v2 -t your_name/kubesec --push .

I did fork kubesec repo and work on the github actions and have some success:

master...zanhsieh:kubesec:master
https://github.com/zanhsieh/kubesec/actions/runs/5261715705
https://hub.docker.com/repository/docker/zanhsieh/kubesec/tags?page=1&ordering=last_updated

@06kellyjac
Copy link
Member

Thanks @zanhsieh

I'm obligated to say use 3rd party builds of kubesec at your own risk.

It's pretty trivial to do your own container build from source if your host is arm. Also if you don't want to build from source you can copy the specific arm release binary you need into a scratch container, see Dockerfile.scratch for inspiration

I wonder if you can do FROM --platform=linux/arm64 scratch then just COPY the aarch64 binary even on an amd64 host since it's not actually got any RUN commands etc. It might also need DOCKER_DEFAULT_PLATFORM to be set 🤔


I'll try and update the container builds in GHA soon so it publishes for different platforms
We're already using buildx so it might just be a case of telling it to build for the other platforms. Worst case it also needs a tiny bit of extra configuration

@zanhsieh
Copy link

zanhsieh commented Jun 14, 2023

I wonder if you can do FROM --platform=linux/arm64 scratch then just COPY the aarch64 binary even on an amd64 host since it's not actually got any RUN commands etc. It might also need DOCKER_DEFAULT_PLATFORM to be set 🤔

I just did fork and checkout master branch from this repo, docker buildx build without any specific FROM --platform=linux/arm64 scratch on my M1 MBP, and it succeeded. It actually surprised me.

Also docker buildx build with QEMU on the Github Action workflow did handle various platform build. Current the CodeQL problems resolved.

@MarioUhrik MarioUhrik linked a pull request Jul 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Kubesec
  
To Do
Development

Successfully merging a pull request may close this issue.

4 participants