Community discussions

MikroTik App
 
rel
just joined
Topic Author
Posts: 3
Joined: Thu Feb 02, 2023 1:53 am

Container can't running on arm64 RouterOS

Tue Feb 21, 2023 7:34 am

I have a self-compiled container that build from alpine can successfully running on M1 macOS docker desktop, but not running on arm64 RouterOS.
The main purpose of this container is running a special Linux binary.
I have tested it in many cases. The following are each of them.

Alpine-arm64 + glibc + special arm64 binary v3 -> running on M1 macOS ✅
Alpine-arm64 + glibc + special arm64 binary v3 -> running on RB5009 ✅
Alpine-arm64 + glibc + special arm64 binary v3 -> running on hAP ax2 ✅
Alpine-amd64 + glibc + special amd64 binary v3 -> running on CHR ✅

In general, the v3 binary running without any problem in any arch on any device.

Alpine-arm64 + glibc + special arm64 binary v4 -> running on M1 macOS ✅
Alpine-arm64 + glibc + special arm64 binary v4 -> running on RB5009 ❌
Alpine-arm64 + glibc + special arm64 binary v4 -> running on hAP ax2 ❌
Alpine-amd64 + glibc + special amd64 binary v4 -> running on CHR ✅

In general, the v4 binary have running issue with arm64 RouterOS devices. But it doesn't have any issue with amd64 RouterOS devices or arm64 macOS devices.

I appreciate any ideas of next move?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Container can't running on arm64 RouterOS

Sat Feb 25, 2023 3:56 pm

Dunno on the specific arm64 specials stuff.

But I think there is a more general bug in that /container doesn't always read "metadata" correctly. The most recent versions of BuildKit do something stuff with Docker attestations" (e.g. metadata) that RouterOS doesn't like. See viewtopic.php?t=192810#p981824

But I don't think this comes up if you "docker save" and use a tar – which I suspect you are. So above may not help, but if it's having trouble with "standard" metadata...I can see how your "specials" might also be effected. Fiddling with the buildx args (or podman) may help – Mikrotik wants it basic it seems... I ran into issues with pull'ing multiplatform images I was trying to build: viewtopic.php?t=193727#p986366 where removing any attestations solved it.

Do you get any errors on the failed cases? Does it extract (e.g. find the layers)? Does it fail to start with "exec()" bad format error?
 
rel
just joined
Topic Author
Posts: 3
Joined: Thu Feb 02, 2023 1:53 am

Re: Container can't running on arm64 RouterOS

Sat Mar 04, 2023 2:05 am

removed excessive quotting of preceding post; be wise, quote smart, save network traffic
You are right. All of my docker has been "docker save" before imported. None of them are downloaded directly into the disk.

During some other docker tries, I found another problem. For dockers successfully run on Docker Desktop, the entrypoint is not executed on container start at RouterOS.

If I manually enter into the container shell, execute the same entrypoint command, the docker will work as expected.

Do you have any idea how to fix the entrypoint fail?
Last edited by BartoszP on Wed Mar 15, 2023 3:41 pm, edited 1 time in total.
Reason: removed excessive quotting of preceding post; be wise, quote smart, save network traffic
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Container can't running on arm64 RouterOS

Sat Mar 04, 2023 2:35 am

Does sound like a bug.

Did you try using --sbom=false --provenance=false. with buildx? The newer BuildKit doesn't like RouterOS is what I know. So your issue may very well related.
 
rel
just joined
Topic Author
Posts: 3
Joined: Thu Feb 02, 2023 1:53 am

Re: Container can't running on arm64 RouterOS

Wed Mar 15, 2023 2:50 pm

I got this with latest docker desktop for macOS arm.
ERROR: attestations are not supported by the current buildkitd
Last edited by BartoszP on Wed Mar 15, 2023 3:41 pm, edited 1 time in total.
Reason: removed excessive quotting of preceding post; be wise, quote smart, save network traffic
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3169
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: Container can't running on arm64 RouterOS

Wed Mar 15, 2023 5:26 pm

Yeah I forgot you were using a TAR files, the attestations wouldn't even come up there. My thought was since RouterOS seems to have trouble reading other metadata, if there was some unusual metadata in the image for the "ARM v4", it could be a similar cause.

So I guess the question are you getting a execv() error in the logs, that tell you if it was a binary format problem. Or is the issue where the "v4" ones don't work someplace else like during extraction – that suggest the metadata.

Who is online

Users browsing this forum: No registered users and 5 guests