Getting "exec /sidekick: exec format error" while starting Docker container on s390x
pantovad opened this issue · 1 comments
pantovad commented
Expected Behavior
The sidekick should start with no error
Current Behavior
Getting error:
root@molecule-ubuntu-2204-s390x:~# uname -a
Linux molecule-ubuntu-2204-s390x 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:17:22 UTC 2023 s390x s390x s390x GNU/Linux
root@molecule-ubuntu-2204-s390x:~# docker run --rm -it minio/sidekick:v3.0.4 --health-path /minio/health/ready --address :9000 http://minio:9000
exec /sidekick: exec format error
Possible Solution
Obviously the sidekick binary of amd64 is packed in s390x Docker layer - confirmed after unpacking the image on s390x and checking:
root@molecule-ubuntu-2204-s390x:~/sidekick/79fd9b7bf8e3b9ce9a946fb944dd9b9a5c32fec341b7407a621bcb8fbc44c5cf# tar xvf layer.tar
sidekick
root@molecule-ubuntu-2204-s390x:~/sidekick/79fd9b7bf8e3b9ce9a946fb944dd9b9a5c32fec341b7407a621bcb8fbc44c5cf# ls -lrta
total 24572
-rwxrwxr-x 1 root root 12570624 Jul 8 00:40 sidekick
-rw-r--r-- 1 root root 12572160 Jul 8 00:40 layer.tar
-rw-r--r-- 1 root root 861 Jul 8 00:40 json
-rw-r--r-- 1 root root 3 Jul 8 00:40 VERSION
drwxr-xr-x 3 root root 4096 Aug 28 13:11 ..
drwxr-xr-x 2 root root 4096 Aug 28 13:11 .
root@molecule-ubuntu-2204-s390x:~/sidekick/79fd9b7bf8e3b9ce9a946fb944dd9b9a5c32fec341b7407a621bcb8fbc44c5cf# file sidekick
sidekick: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=zb817YeBBYgvVJ7SZbL3/oM03Q_bBOrvhsCyegxkI/sAlWK_P4g-BvQDaHKy1K/A-3WHbw_LifNDEvDi_fG, stripped
Steps to Reproduce (for bugs)
On s390x machine (or Qemu s390x emulation) run:
docker run --rm -it minio/sidekick:v3.0.4
or
docker run --rm -it minio/sidekick:v3.0.4-s390x
Context
Regression
Your Environment
- Version used (
sidekick version
): Docker image minio/sidekick:v3.0.4 - Environment name and version (e.g. nginx 1.9.1):
- Server type and version: Qemu s390x VM with Ubuntu 22.04 and Docker v24.0.2
- Operating System and version (
uname -a
): Linux molecule-ubuntu-2204-s390x 5.15.0-76-generic '#'83-Ubuntu SMP Thu Jun 15 19:17:22 UTC 2023 s390x s390x s390x GNU/Linux - Link to your project:
harshavardhana commented
fixed in master via 0d1c42c