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 builds #17

Closed
ViViDboarder opened this issue Jul 13, 2019 · 4 comments · Fixed by #18
Closed

Multi-arch builds #17

ViViDboarder opened this issue Jul 13, 2019 · 4 comments · Fixed by #18

Comments

@ViViDboarder
Copy link
Contributor

It would be great to have multi-arch builds for this as well for use on Raspberry Pi and other systems.

I see you use a script to do the builds already, so it would not be too much to change over.

Since haproxy already supports multi-arch, you can use a build arg to set the source repo. I'm not sure how you do builds today, but I can help if you'd like.

@yajo
Copy link
Contributor

yajo commented Jul 17, 2019

AFAIK to do that you'd need to have a build machine that runs in the desired arch (which I don't have) or use qemu. If you're able to it with qemu, we can review the PR.

@ViViDboarder
Copy link
Contributor Author

Actually, that's not necessary for this image since the build steps don't actually have to execute anything within the layer. It only copies files into it. Also, the base layer you use already has multi-arch builds.

I made a forked pipeline using Drone so that I could pull an image on my Raspberry Pi, but I'm not sure how you're doing builds. This is the gist of it though.

Update the top of the Dockerfile to make the repo a build arg:

ARG REPO=library
FROM ${REPO}/haproxy:1.9-alpine

Then do a build passing in the desired repo arch, eg: REPO=arm32v6 That's about it!

If you'd like to see the whole pipeline, I can share a link to my private server with the diff. I could also patch hooks/build to build a few architectures and tag them as $IMAGE_NAME-$REPO. It'd be handy to build a manifest too so folks can just pull and not worry about the tag. Drone has a plugin making it easy for me, so I'm not sure how to do that manually.

@yajo
Copy link
Contributor

yajo commented Jul 19, 2019

I'm using docker hub to build. Can that be done there?

@ViViDboarder
Copy link
Contributor Author

Cool! I didn't realize you could customize build hooks on Docker Hub.

I managed to get this working on Docker Hub as well. Incoming PR.

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

Successfully merging a pull request may close this issue.

2 participants