0

I am using x86 centos7 linux. I want to use cross-compile to arm64 in docker but I can't use docker buildx --platform because of the low Kenel version (centos7)

What should I do?

I've searched about QEMU, docker to solve this problem but I can't find the solution.


I want to make the system like this

| app1 | app2 | app3 | app4 |  
|          docker           |  
|     qemu(arm64, x86..)    |  
|    host os (computer os)  |  
|    host h/w (computer)    | 

or.... maybe like this (uncertain)

| app1 | app2 | app3 | app4 |  
|     qemu(arm64, x86..)    |  
|          docker           |  
|    host os (computer os)  |  
|    host h/w (computer)    |  

*app1:arm64 / app2:x86 / app3:arm64 / app4:x86

Please remember that centos7 uses yum, not apt.

5
  • 2
    centos7 is EOL since 3 years. the easy answer here is "upgrade" Commented Aug 11, 2023 at 8:03
  • @RickRackow there might be plenty of reasons to keep using a software version. I understand your comment but let's wait for someone to have an answer to this. Commented Aug 11, 2023 at 8:08
  • github.com/multiarch/qemu-user-static is a way to run non-native docker images directly (i.e. docker can just start images with --platform linux/arm64). I don't know if it depends on the same kernel features that break buildx, though. Commented Aug 11, 2023 at 8:15
  • 3
    You're right @S.Dre let me get a real answer here. Mainly the ability to use buildx depends on your version of docker-engine, not your kernel per se. In later versions (that might not be available for you) buildx is available as plugin for docker so you can run commands like docker buildx, however if you have at least docker engine 19.03 or above, you can run the buildx binary directly and still get builds as stated here github.com/docker/buildx/issues/160#issuecomment-541161728 Commented Aug 11, 2023 at 8:21
  • yes, buildx depends on my version of docker-engine(19.03). but, Kernel version should be newer than 4.8. Centos 7 with kernel 3.10 doesn't support cross compilation on docker images. *stackoverflow.com/questions/73778867/… Commented Aug 16, 2023 at 7:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.