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.
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: http://forum.mikrotik.com/t/import-adguard-dns-container-image-problem/164536/1 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?
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?
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.
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.