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 in Dockerhub #23

Closed
thrau opened this issue Oct 25, 2019 · 9 comments
Closed

Multi-arch builds in Dockerhub #23

thrau opened this issue Oct 25, 2019 · 9 comments

Comments

@thrau
Copy link

thrau commented Oct 25, 2019

it would be great if this docker image could be pushed to Dockerhub with a multi-arch manifest.
this would be very useful, because it allows us to run docker pull networkboot/docker-dhcpd on, e.g., a raspi running hypriot, and it would run out of the box (currently that doesn't work because there are only amd64 builds on Dockerhub, and starting the container fails as expected).

There are multiple ways to create multi-arch images from an x86 machine. One way is using the buildx plugin 1.
Another (I think outdated way) is to use qemu have multiple Dockerfiles for each arch and then building a manifest manually 2, which I saw was removed in d58f435.

any chance we can get arm32 & aarch64 builds into Dockerhub?

@robinsmidsrod
Copy link
Contributor

@thrau I agree that multi-architecture builds would be nice, but the project is currently using the automated build features in Docker Hub to build a new image whenever the git repo changes. Obviously we'd want to continue doing this, both for the assurance that images contain whatever the Dockerfile says it should, but also because of the automation benefits associated with it.

If you were able to submit a PR that maintains this benefit while at the same time introducing multiarch then I think we could get something done.

The reason the commit you mentioned was removed/reverted was because the build previously contained a manually compiled binary, but now it only uses packages from APT repos, which means that building the image locally on your own architecture shouldn't give you any issues.

I have no experience with either of the two methods mentioned, but I'd want to avoid experimental features, mostly because they could be removed or changed, and then the build would break (probably at a time where it's most unfortunate to everyone that uses it).

Looking forward to a PR implemented with these things in mind.

@wickywaka
Copy link
Contributor

Any progress on this?

@robinsmidsrod
Copy link
Contributor

@waqarrashid33 Unfortunately, no. Since the last comment, Docker Hub automations is a paid-only feature, so GitHub Actions is probably the better choice going forward. I've not used that before, so any help on that topic would be greatly appreciated.

@berlin4apk
Copy link

After next weekend
I can make a draft PR for the GitHub action create a multi platform docker Image

@wickywaka
Copy link
Contributor

@berlin4apk That would be amazing, I am also a bit new to the dockerization stuff.

@wickywaka
Copy link
Contributor

@berlin4apk Is this the right path? If you don't have much time, I can give it a try and then you can review it to make sure that its up to the standard.
http://blog.mauriciofreitas.eng.br/docker/2020/12/25/multiarch-docker-build-github-actions-en.html

@wickywaka
Copy link
Contributor

Please have a look at the pull request and recommend changes or improvements. @berlin4apk @robinsmidsrod

@robinsmidsrod
Copy link
Contributor

It seems like the PR is moving forward. Hopefully we'll have something here soon.

@robinsmidsrod
Copy link
Contributor

@wickywaka Thanks for the PR! Now we've got something that builds the docker images automatically. And ARM is supported!

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

No branches or pull requests

4 participants