Organizr/docker-organizr

Arm64 image not working on RPI 4: standard_init_linux.go:211: exec user process caused "exec format error"

telefax opened this issue · 10 comments

I'm running docker on centos inside a vmware vm on RPI 4.

I tried docker run with all arm tags but they just result in:

standard_init_linux.go:211: exec user process caused "exec format error"

When I ran docker build on linux-arm64.Dockerfile, then the container starts!

The image inspect arch says:
"Architecture": "arm64" which is the same as organizr/organizr:arm64.

uname -a
Linux cs001 4.18.0-193.28.1.el8_2.aarch64 #1 SMP Thu Oct 22 00:42:58 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

Do you have any multiarch images running?

I guess so, I'm running:

traefik:latest
influxdb
jacobalberty/unifi:latest
grafana/grafana

Now I'm trying to figure out why there are no files in /config/www/organizr, guess I missing something here.

Does the linux-arm64 tag work?

linux-arm64

Nope :(


# docker container run organizr/organizr:linux-arm64

standard_init_linux.go:211: exec user process caused "exec format error"
# docker container run organizr/organizr:latest
standard_init_linux.go:211: exec user process caused "exec format error"

Trying on an RPI 3 running raspian and it works.

I spotted something now, in the RPI 3 the scripts are executable (+x) but not on RPI 4:

root@49cab85d24d5:/etc/cont-init.d$ ls -ltr
total 24
-rw-r--r-- 1 root root  190 Oct 23 20:03 50-debug
-rw-r--r-- 1 root root 2241 Oct 23 20:03 30-setup
-rw-r--r-- 1 root root 1484 Oct 23 20:03 20-config
-rw-r--r-- 1 root root  350 Oct 23 20:03 10-adduser
-rw-rw-rw- 1 root root 3410 Oct 29 21:27 40-install
-rw-rw-rw- 1 root root 1394 Oct 29 21:27 35-fpm

I think this is whats causing the trouble.

Ok, so I poked around a little (+x was not the issue) and now it seems that the official images I pulled has s6 in 32bit + wrong arch , which fails on the RPI 4.

For instance:
Using organizr/organizr:latest which gives format error:

file /bin/importas
/bin/importas: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped

Using docker-compose with docker-base and create an image, where this file executes fine.

file /bin/importas
/bin/importas: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped

So I used docker-compose to build docker-organizr as well, based on my own docker-base image and it now has the correct s6 binaries and the /init script runs fine.

So, back on my RPI 3:

file /bin/importas
/bin/importas: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped

So, Is this simply a cross compilation issue where arm64 is not really aarch64?

Checking the image on docker hub:

https://hub.docker.com/layers/organizr/organizr/linux-arm64/images/sha256-073ded4cc898af13d7ffca93d02b731c96ed1a41a219f24f709d8c8787df79e6?context=explore

Which says:
ENV S6_REL=2.1.0.2 S6_ARCH=armhf S6_BEHAVIOUR_IF_STAGE2_FAILS=2 TZ=Etc/UTC

And my native builld:
ENV S6_REL=2.1.0.2 S6_ARCH=aarch64 S6_BEHAVIOUR_IF_STAGE2_FAILS=2 TZ=Etc/UTC

Good catch. I will modify the buildprocess to pull explicit arches, rather than relying on the manifest.

I did some changes to explicit do the arches, can you try roxedus/organizr?

Yepp, works perfect now! :)

Awesome, will merge now, and you can go back to the official one pretty soon