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

Multi-Arch Support #18

Open
tuxpeople opened this issue Feb 24, 2021 · 8 comments
Open

Multi-Arch Support #18

tuxpeople opened this issue Feb 24, 2021 · 8 comments

Comments

@tuxpeople
Copy link

Hi

Just stumbled upon this. For the very same reasons, I created my one "debugging" Image.

I'm thinking now to drop mine in favor of yours. Would you mind to make your image multiarch? Mainly arm64 would be interesting for me, as I'm doing a lot with ARM based Kubernetes.

Kind regards
Thomas

@leodotcloud
Copy link
Owner

@tuxpeople Thanks for the suggestion (sorry just seeing your message). Would you be able to provide a PR?

@tuxpeople
Copy link
Author

Looks like you are using Drone for your pipeline. tbh, I've not much experience with Drone. I used to do it with GitHub actions, and sometimes with Travis.

@leodotcloud
Copy link
Owner

@tuxpeople if you the build scripts, I can integrate them into Drone.

@tuxpeople
Copy link
Author

@leodotcloud

Right now, I'm using GitHub Actions, that's how I'm doing it right now:
https://github.com/tuxpeople/docker-debugcontainer/blob/master/.github/workflows/release.yml

My travel to this solution started here: https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/ this article explains a lot of the whole background how to to this using dockers buildx and qemu.

The essence of this article is this script: https://gist.github.com/ArturKlauser/76c29a059f2a73783e77a3ce98cd23c2

This script was more or less the one I used with TravisCI before I switched to GitHub Actions:
https://github.com/tuxpeople/docker-debugcontainer/blob/41dbe0173c249893d74e26e37a90100cd672d34b/ci_old/.travis/build-deploy.sh

The script expects to be run in a clean Ubuntu VM and will install all the dependencies needed for Docker buildx you basically just need to call it's main function:
https://gist.github.com/ArturKlauser/76c29a059f2a73783e77a3ce98cd23c2#file-multi-arch-docker-ci-sh-L15-L16

You need to provide some env-vars like

DOCKER_USERNAME
DOCKER_PASSWORD
DOCKER_BASE

Others like DOCKER_PLATFORMS are set by the script:
https://gist.github.com/ArturKlauser/76c29a059f2a73783e77a3ce98cd23c2#file-multi-arch-docker-ci-sh-L121-L123

Not sure if you could implement this in drone.

@xshadowlegendx
Copy link

hello @leodotcloud, I have tried building the docker image replacing amd64 with $(dpkg --print-architecture) and so far able to installed everything inside the Dockerfile and run those commands, I was gonna try drone but they seems to be moving to harness so I haven't try that yet.

Im going to build the swift army knife binary next and test it with the image, so after this works all left is to include it into drone build is that all? if so I could maybe help with the pr

@leodotcloud
Copy link
Owner

@xshadowlegendx PR would be highly appreciated!

@leodotcloud
Copy link
Owner

Ideally would be good if we can migrate to GitHub Actions, been hard to get cycles for that.

@xshadowlegendx
Copy link

hello @leodotcloud, ok I will add the arm64 support and also add github workflow for this in a pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants