multiarch / centos

:earth_africa: `centos` Docker image for multiple architectures
MIT License
9 stars 5 forks source link

CentOS8 info #11

Closed junaruga closed 4 years ago

junaruga commented 5 years ago

This ticket is to share the info about coming CentOS 8 architecture info.

CentOS 8 build status

CentOS 8.0.1905 build status https://www.centos.org/forums/viewtopic.php?f=10&t=70501

Architectures

https://wiki.centos.org/About/Building_8#head-c2699098ec0696d4d4aafbd404d74fa37546a8ec

martin-g commented 4 years ago

Any chance to release aarch64 image for CentOS 8 ? I need it for building packages for Varnish Cache - https://github.com/varnishcache/varnish-cache/pull/3263

junaruga commented 4 years ago

@martin-g Unfortunately multiarch/centos is deprecated repository. You can run your container image without using this with multiarch/qemu-user-static -p option

You can check the README in this repository. https://github.com/multiarch/qemu-user-static

If your host kernel version (uname -r) is 3.x (< 4), you can check this ticket: https://github.com/multiarch/qemu-user-static/issues/100#issuecomment-566030523 .

junaruga commented 4 years ago

I would close this ticket for now.

junaruga commented 4 years ago

@martin-g I can also recommend you running CentOS non-x86_64 containers on Travis CI (aarch64, ppc64le, s390x) or Drone CI (aarch64 and armv8) if using QEMU is not required.

martin-g commented 4 years ago

Thanks for the answer! I've tried this but without -p yes and it was failing for any image different than yours (multiarch/...). With -p yes it works fine! Awesome!

martin-g commented 4 years ago

Unfortunately https://github.com/martin-g/varnish-cache/commit/cc11d1663898645b0c518e86e999f6abe410c480 failed at CircleCI: https://app.circleci.com/pipelines/github/martin-g/varnish-cache/196/workflows/b33c0299-75cf-4560-a7d1-3aa51dd98ad3/jobs/1132 I will need to stick with your images for the time being.

junaruga commented 4 years ago

https://app.circleci.com/pipelines/github/martin-g/varnish-cache/196/workflows/b33c0299-75cf-4560-a7d1-3aa51dd98ad3/jobs/1132

Your command

sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes  --persistent yes

is wrong . And it failed with the error message "sh: write error: Invalid argument" in "Activate QEMU".

This command is correct removing :register.

sudo docker run --rm --privileged multiarch/qemu-user-static --reset --credential yes  --persistent yes
junaruga commented 4 years ago

And QEMU is emulation. I would say again that you can run CentOS aarch64 container on the native aarch64 environment on Travis or Drone CI.

martin-g commented 4 years ago

Thanks for the help, @junaruga !

I know that QEMU is just an emulation. Varnich Cache already uses CircleCI and the team is happy with it. This is the reason I try to use QEMU. HAProxy used to use TravisCI for testing on ARM64 but it was both slow and very unstable (failing for infrastructure reasons) and they disabled ARM64 from the matrix.

Today I've changed the QEMU activation to:

docker run -it --rm --privileged multiarch/qemu-user-static --reset --credential yes --persistent yes

but again it fails with:

Status: Downloaded newer image for multiarch/qemu-user-static:latest
^@^@Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha
sh: write error: Invalid argument
Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm
sh: write error: Invalid argument

https://app.circleci.com/pipelines/github/martin-g/varnish-cache/198/workflows/74a620b9-d05e-4ec7-a24b-10e579225bac/jobs/1176 Any hints what could be wrong ?

martin-g commented 4 years ago

I think I've found the reason: https://github.com/multiarch/qemu-user-static/issues/100#issuecomment-566030523 CircleCI runs Ubuntu Trusty with 4.4.0 kernel. It seems it does not support flag F. F appears in 4.8: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/binfmt_misc.txt?h=v4.8#n37

I will try now with the workaround from https://github.com/multiarch/qemu-user-static/issues/100#issuecomment-566083588

martin-g commented 4 years ago

The workaround didn't work but I've found how to use a newer Ubuntu (Xenial, 4.14.0) and now it works fine! Sorry for the noise here!