docker / roadmap

Welcome to the Public Roadmap for All Things Docker! We welcome your ideas.
https://github.com/orgs/docker/projects/51
Creative Commons Zero v1.0 Universal
1.74k stars 261 forks source link

[Docker Hub] Support ARM Automated Builds #109

Open ollypom opened 4 years ago

ollypom commented 4 years ago

There are existing issues in the Hub repo but bringing this up in the roadmap repo too.

https://github.com/docker/hub-feedback/issues/1261 https://github.com/docker/hub-feedback/issues/1874

Tell us about your request Today you can not "easily" build ARM based images using Docker Hub Automated Builds. There does appear to be a workaround by installing QEMU in a pre hook but I wouldn't say thats straightforward.

It would be great if ARM builds could be classed as a first citizen on Docker Hub Automated Builds. For performance an ARM build node would be the best option, but at this point pre installing QEMU and leveraging buildx would be a good start.

Which service(s) is this request for? Docker Hub

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Building ARM based container images on Docker Hub Automated Builds

Are you currently working around the issue? Yes, by building locally or via A1 / M6g instances in AWS.

watermark commented 4 years ago

With reports of Macs switching to ARM, this really should be looked at again

scyto commented 4 years ago

does it make sense to broaden this roadmap item to support all architectures that buildkit supports? aka now that build kit is supported we would just specify the architectures we want either in the docker file or some sort of manifest?

justincormack commented 4 years ago

@scyto quite a few people want physical hardware builds not emulated or cross builds as their code builds slowly in emulation. Feel free to open a different issue about qemu support.

schklom commented 3 years ago

Any hope for this in 2021 ? :)

ocean commented 3 years ago

I've just tried setting up (emulated) multi-arch Docker Hub autobuilds with custom hooks, and it appears that Docker Hub runs Ubuntu 16.04 infrastructure (or equivalent Amazon Linux), which doesn't seem to have a recent enough kernel to support the QEMU emulation that buildkit requires for building multi-arch images 😞

According to https://github.com/docker/buildx#building-multi-platform-images Buildkit requires kernel > 4.8, whereas Ubuntu 16.04 only has kernel 4.4.*

I wonder if there's a plan to move Docker Hub builds to more recent infrastructure soon.

See also https://github.com/docker/hub-feedback/issues/1874

ejsuncy commented 3 years ago

Also watching this issue.

rwojsznis commented 2 years ago

@ocean, any chance you could share your findings? I'm looking for something similar, but it seems using Github actions is the way, which is kinda disappointing if you are already paying for docker hub in the first place 😕

I haven't run any tests yet, but I'm thinking about using pre_build hooks (qemu setup) and customizing build (build with platform flags) step - in theory that might work 🤔

ocean commented 2 years ago

@rwojsznis I'm sorry I can't remember what exactly my setup was, but it sounds similar to that - I used custom hooks to install the multiarch/qemu-user-static Docker image which provides the driver, but it didn't work because of lack of kernel support for the emulator on the Ubuntu kernel run by Docker Hub at the time. I'm not sure if they've updated it now or not.

I guess seeing as this issue is still open, they probably haven't :(

Alkarex commented 2 years ago

@rwojsznis See an example (improvements welcome, but not here not to pollute this thread):