Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container with platform linux/arm64 was build with GOARCH=amd64 #9073

Closed
highercomve opened this issue Jul 22, 2022 · 0 comments · Fixed by #9074
Closed

Docker container with platform linux/arm64 was build with GOARCH=amd64 #9073

highercomve opened this issue Jul 22, 2022 · 0 comments · Fixed by #9074

Comments

@highercomve
Copy link
Contributor

Tendermint version unreleased-master-023c21f3074189da5e8dfbe01ce8469dfdc90eb6 (tendermint/tendermint:latest container)

Environment:

  • OS: Docker container for platform linux/arm64
  • Install tools: docker pull --platform linux/arm64 tendermint/tendermint

What happened:
The docker container for linux/arm64 has the same amd64 binary as the linux/arm64 container.

Here more details about it:

docker run --platform linux/arm64 -it --rm -u 0 --entrypoint bash tendermint/tendermint:latest 
bash-5.1# apk add file
(1/2) Installing libmagic (5.41-r0)
(2/2) Installing file (5.41-r0)
Executing busybox-1.35.0-r15.trigger
OK: 18 MiB in 27 packages
bash-5.1# file /usr/bin/tendermint 
/usr/bin/tendermint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=-n_7mjFDRDblBdnl8wXJ/atsROW7ZHWymd51BjXOt/wHE665cBIo8iY34WYFes/xgVItN73dFWTSXDYo-X-, stripped
bash-5.1# tendermint version
unreleased-master-023c21f3074189da5e8dfbe01ce8469dfdc90eb6
bash-5.1# uname -a
Linux c904da659532 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 aarch64 Linux

What you expected to happen:
The binary on arch should be on arch architecture, like in this example:

docker run --platform linux/arm64 -it --rm -u 0 --entrypoint bash highercomve/tendermint:v0.35.4
bash-5.1# apk add file
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/aarch64/APKINDEX.tar.gz
(1/2) Installing libmagic (5.40-r1)
(2/2) Installing file (5.40-r1)
Executing busybox-1.33.1-r8.trigger
OK: 18 MiB in 27 packages
bash-5.1# file /usr/bin/tendermint 
/usr/bin/tendermint: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=BqzIMY1FU-d-hsCEm8Yn/OTAEmZ8XBb0nxJmVGF47/-dpCS8Ecx_jro26JhEK-/rWdnRRD6htnvNZrLlpWL, stripped
bash-5.1# uname -a
Linux 8bb2ade55896 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 aarch64 Linux

Have you tried the latest version: yes/no
yes

How to reproduce it (as minimally and precisely as possible):

docker run --platform linux/arm64 -it --rm -u 0 --entrypoint bash tendermint/tendermint:latest 
bash-5.1# apk add file
(1/2) Installing libmagic (5.41-r0)
(2/2) Installing file (5.41-r0)
Executing busybox-1.35.0-r15.trigger
OK: 18 MiB in 27 packages
bash-5.1# file /usr/bin/tendermint 
/usr/bin/tendermint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=-n_7mjFDRDblBdnl8wXJ/atsROW7ZHWymd51BjXOt/wHE665cBIo8iY34WYFes/xgVItN73dFWTSXDYo-X-, stripped
bash-5.1# tendermint version
unreleased-master-023c21f3074189da5e8dfbe01ce8469dfdc90eb6
bash-5.1# uname -a
Linux c904da659532 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 aarch64 Linux

Anything else we need to know:
I created a solution for this and use it in order to be able of running tendermint on a Raspberry PI 3, Raspberry PI 4 and an NVIDIA Tegra Nano

highercomve added a commit to highercomve/tendermint that referenced this issue Jul 22, 2022
highercomve added a commit to highercomve/tendermint that referenced this issue Jul 22, 2022
highercomve added a commit to highercomve/tendermint that referenced this issue Jul 22, 2022
highercomve added a commit to highercomve/tendermint that referenced this issue Aug 3, 2022
highercomve added a commit to highercomve/tendermint that referenced this issue Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant