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

armv7 images #38

Merged
merged 11 commits into from
May 17, 2020
Merged

armv7 images #38

merged 11 commits into from
May 17, 2020

Conversation

Silex
Copy link
Owner

@Silex Silex commented Jan 6, 2020

Hi!

Just wondering if you plan to add avmv7 alpine images.

@Silex
Copy link
Owner

Silex commented Feb 1, 2019

Hello!

Hum, good question, I never really thought about it.

Reading about it a bit at https://lobradov.github.io/Building-docker-multiarch-images and https://medium.com/@mauridb/docker-multi-architecture-images-365a44c26be6 I'm not quite sure what the path toward that would be.

Questions to be solved:

  • What is the simplest way to build images for other architectures?
  • Would travis be able to build these images or should we switch to gitlab-ci?
  • Would this be easier if we switched from my custom ruby-build to https://github.com/tianon/stackbrew?

@Silex
Copy link
Owner

Silex commented Mar 4, 2019

@NicolasPetton: do you have any experience with building armv7 images?

@NicolasPetton
Copy link
Author

NicolasPetton commented Mar 4, 2019 via email

@Silex
Copy link
Owner

Silex commented Mar 4, 2019

Okay, I was hoping for a head start. I guess I'll have to learn the hard way 😉

@Silex
Copy link
Owner

Silex commented Mar 4, 2019

Hum, can you clarify which architectures you are interested in? https://github.com/multiarch/qemu-user-static/releases

FROM amd64/alpine:3.7
FROM arm32v6/alpine:3.7
FROM arm64v8/alpine:3.7

So many to choose from 😨

@Silex
Copy link
Owner

Silex commented Mar 4, 2019

Docker architecture uname -m architecture Note
amd64 x86_64  
arm32v6 armhf, arm7l Raspberry Pis
arm64v8 aarch6 A53, H3, H5 ARMs

Take it with a grain of salt - some Docker baseimages don’t provide all variants, and arm32v7 is backwards compatible with arm32v6, so for library/alpine, you will actually use arm32v6 variant for all Raspberry Pies.

@NicolasPetton
Copy link
Author

NicolasPetton commented Mar 4, 2019 via email

@NicolasPetton NicolasPetton changed the title armv7 images armv8 images Mar 4, 2019
@NicolasPetton
Copy link
Author

Now I'm confused, the rpi3 CPU is 64bits armv8, but the kernel on a raspbian install is armv7l 😕
The reason is that apparently no 64bits kernel is provided by the raspberry pi foundation, and raspbian uses a 32bits kernel instead.

@NicolasPetton
Copy link
Author

Hi @Silex, is there any way I can help with this?

@Silex
Copy link
Owner

Silex commented Sep 24, 2019

Sure 👍 Answering the questions below would be a good start:

  • Which architectures to support?
  • What is the simplest way to build multi-arch images?
  • Would travis be able to build these images or should we switch to something else (e.g gitlab-ci)?

@NicolasPetton
Copy link
Author

@NicolasPetton NicolasPetton changed the title armv8 images armv7 images Sep 24, 2019
@Silex
Copy link
Owner

Silex commented Sep 24, 2019

  • armv7

Alright.

No it looks reasonably easy.

  • I googled, and I don't think Travis has support for arm :/

That is way more annoying 😞

But good news I found this:

I need to think about it to see how feasible it is to do that in the current architecture.

@NicolasPetton
Copy link
Author

Great, thanks.

Let me know if you want my help at some point.

@Silex Silex mentioned this pull request Oct 7, 2019
@Silex
Copy link
Owner

Silex commented Jan 6, 2020

Okay... I can build on arm64 using travis beta arm builds, but this makes the amd64 builds fail: https://travis-ci.org/Silex/docker-emacs/builds/633236712

This happens because to build Emacs < 27 you need to disable randomize_va_space (see moby/moby#22801) and the image they use for multiarch is "too modern" :-)

Anyway, it looks like this would not support arm32 images and I'll need to create multi-arch manifests for each images anyway so I don't think building the images separatly makes sense.

I'll confirm and then try the qemu solution.

@NicolasPetton
Copy link
Author

NicolasPetton commented Jan 6, 2020 via email

@Silex Silex force-pushed the multiarch branch 11 times, most recently from a1dbbf8 to 2694cde Compare January 10, 2020 20:48
@DamienCassou
Copy link
Contributor

DamienCassou commented May 10, 2020 via email

@Silex
Copy link
Owner

Silex commented May 10, 2020

Ok I decided to build what builds for now, and I'll make issues about what doesn't build for later solving.

@Silex Silex merged commit f4feff9 into master May 17, 2020
@Silex Silex deleted the multiarch branch May 17, 2020 07:25
@Silex
Copy link
Owner

Silex commented May 17, 2020

🎉

More modifications will follow in #58

Please test a bit and notice me if you find anything.

@DamienCassou
Copy link
Contributor

DamienCassou commented May 22, 2020

Thank you so much for your work @Silex. For now, it doesn't seem to work but I'm not sure this has anything to do with your images:

https://drone.petton.fr/mpdel/libmpdel/73/1/2

Maybe related to harness/harness#2955?

@Silex
Copy link
Owner

Silex commented May 23, 2020

@DamienCassou: good catch, apparently something didn't build latest properly!

https://hub.docker.com/r/silex/emacs/tags?page=1&name=latest

As you see https://hub.docker.com/r/silex/emacs/tags?page=1&name=26.3 are multiarch.

I'll figure it out and report.

@Silex
Copy link
Owner

Silex commented May 23, 2020

Ok it's because of docker/buildx#177

I'll work around it in the meantime.

@Silex
Copy link
Owner

Silex commented May 23, 2020

Hum in trying to fix it I also broke 26.3*.

The good news is that I think it'd be fixed soon and be multiarch for all tags :-)

EDIT: it's actually more complicated :-/

@Silex
Copy link
Owner

Silex commented May 24, 2020

Okay, all tags are now multiarch but my workaround sucks (the tags don't point to exactly the same image digests yet the layers are identical). I'm trying to find something elegant.

@DamienCassou
Copy link
Contributor

Okay, all tags are now multiarch but my workaround sucks (the tags don't point to exactly the same image digests yet the layers are identical). I'm trying to find something elegant.

and it is working great!!!!

Before I had to wait at least 5 minutes for a build to finish. Now it's less than 1. Thank you so much.

@NicolasPetton
Copy link
Author

NicolasPetton commented May 25, 2020 via email

@Silex Silex mentioned this pull request Feb 11, 2021
@Silex Silex mentioned this pull request Jun 21, 2022
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

Successfully merging this pull request may close these issues.

3 participants