osixia / docker-keepalived

Keepalived container image 🐳🌴
MIT License
395 stars 143 forks source link

arm64 image is not actually arm64; binaries are x86-64 #42

Open bjencks opened 3 years ago

bjencks commented 3 years ago
[fedora@localhost ~]$ uname -a
Linux localhost.localdomain 5.7.17-200.fc32.aarch64 #1 SMP Fri Aug 21 15:10:15 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
[fedora@localhost ~]$ docker pull osixia/keepalived:2.0.20-arm64v8
2.0.20-arm64v8: Pulling from osixia/keepalived
Digest: sha256:acfac42f4e729a0b0347dac314318ed76d82e2380481b71f1c440b02c617717a
Status: Image is up to date for osixia/keepalived:2.0.20-arm64v8
docker.io/osixia/keepalived:2.0.20-arm64v8
[fedora@localhost ~]$ docker image inspect osixia/keepalived:2.0.20-arm64v8 | grep LowerDir | tr : '\n'
                "LowerDir"
 "/var/lib/docker/overlay2/82e7d7b3a9ec54fb689ac365823148e399f29ce39fa066f768887f966dd9bd65/diff
/var/lib/docker/overlay2/bb27491217a278a04554a5fb41153f184880d502bd2c00e6a1373ed3a801d931/diff
/var/lib/docker/overlay2/33b6cf12d14eb59b81567619525f07749e6c9b08a6a48b288bbb3c8e11207a4b/diff
/var/lib/docker/overlay2/7769b2cce70ac332dc788bf7af7d7a176fddd257de608a9095d06d74f89ec92e/diff
/var/lib/docker/overlay2/e02285343cab0c7ab8122b0b5f146a10a50aea6432524ff104258680dc123e49/diff
/var/lib/docker/overlay2/f5afe5e3ea71694a384fc805273e7d1202d9b61de9d6aa7a8808605eaa04b7b0/diff",
[fedora@localhost ~]$ sudo file /var/lib/docker/overlay2/33b6cf12d14eb59b81567619525f07749e6c9b08a6a48b288bbb3c8e11207a4b/diff/usr/local/sbin/keepalived
/var/lib/docker/overlay2/33b6cf12d14eb59b81567619525f07749e6c9b08a6a48b288bbb3c8e11207a4b/diff/usr/local/sbin/keepalived: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, with debug_info, not stripped
[fedora@localhost ~]$ sudo file /var/lib/docker/overlay2/7769b2cce70ac332dc788bf7af7d7a176fddd257de608a9095d06d74f89ec92e/diff/bin/bash
/var/lib/docker/overlay2/7769b2cce70ac332dc788bf7af7d7a176fddd257de608a9095d06d74f89ec92e/diff/bin/bash: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped

This is probably the same problem as #35, but that seems to be focused on arm32; arm64 is also affected.

linkvt commented 3 years ago

Can confirm, doesn't work on a Raspberry Pi 4 with aarch64

 $ uname -m
aarch64
 $ docker run --rm osixia/keepalived:2.0.20
standard_init_linux.go:211: exec user process caused "exec format error"
Heire commented 3 years ago

Indeed, wrong architecture. was looking for an arm version.

linkvt commented 3 years ago

@Heire I fixed it with my pull request, maybe you can test my image https://hub.docker.com/r/linkvt/osixia_keepalived/tags?page=1&ordering=last_updated (stable tag) and maybe comment in referenced PR to confirm if it works for you.

SiqingYu commented 3 years ago

Confirmed. The arm64/v8 image is actually amd64.

lettore commented 1 year ago

I found this issue too, I'm rebuilding the images with latest Alpine and Keepalived, you can find it at https://hub.docker.com/r/lettore/keepalived/tags tag is x.xx-y.yy.y where x is Alpine version and y Keepalived version.

runfabi commented 1 year ago

Can confirm pulling different digests also results in pulling the non arm image

MarcelloPercoco commented 3 months ago

Hi.

Confirmed even for armv7 image