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

arm64 container fails with "Exec format error" #922

Closed
jrcichra opened this issue Mar 22, 2023 · 4 comments · Fixed by #936
Closed

arm64 container fails with "Exec format error" #922

jrcichra opened this issue Mar 22, 2023 · 4 comments · Fixed by #936
Labels

Comments

@jrcichra
Copy link

Describe the bug
When trying to run ghcr.io/tus/tusd:v1.10.1 on an ARM Amphere system, the container fails to start and displays the error message:

root@oracle-arm01:/home/justin# docker run -it --rm ghcr.io/tus/tusd:v1.10.1
/usr/local/share/docker-entrypoint.sh: line 9: /usr/local/bin/tusd: cannot execute binary file: Exec format error
/usr/local/share/docker-entrypoint.sh: line 9: /usr/local/bin/tusd: No error information

To Reproduce
Steps to reproduce the behavior:
On an arm64 system with docker or an equivalent container runtime, execute docker run -it --rm ghcr.io/tus/tusd:v1.10.1

Expected behavior
Running this command would start tusd.

Setup details
Please provide following details, if applicable to your situation:

  • Operating System: Linux
  • Used tusd version: v1.10.1
  • Used tusd data storage: N/A
  • Used tusd configuration: No configuration
  • Used tus client library: N/A

I suspect specifying the GOARCH in the Dockerfile is the root cause of the issue: https://github.com/tus/tusd/blob/main/Dockerfile#L23

The github action here should do the right thing with no GOARCH in the Dockerfile: https://github.com/tus/tusd/blob/main/.github/workflows/release.yaml#L71

@jrcichra jrcichra added the bug label Mar 22, 2023
@Acconut
Copy link
Member

Acconut commented Mar 26, 2023

Thank you for the detailed report. Can you please open a PR because I am not too experienced working with these Docker tasks?

@dargmuesli
Copy link
Contributor

I think I've provided the fix in #936
Everyone with an ARM machine: please give a review as I do not have an ARM machine myself 🙏 😉

@Acconut
Copy link
Member

Acconut commented Apr 11, 2023

@jrcichra A possible fix from @dargmuesli is in https://github.com/tus/tusd/releases/tag/v1.11.0. Can you please test it out and let us know if it helps?

@jrcichra
Copy link
Author

Hey @dargmuesli thanks for picking this up.
@Acconut I can confirm v1.11.0 is working on my oracle cloud arm64 system:

justin@oracle-arm01:~$ sudo docker run -it --rm ghcr.io/tus/tusd:v1.11.0
[sudo] password for justin: 
Unable to find image 'ghcr.io/tus/tusd:v1.11.0' locally
v1.11.0: Pulling from tus/tusd
c41833b44d91: Pull complete 
f650dbe85a54: Pull complete 
2338337f69c5: Pull complete 
16267e25c6eb: Pull complete 
4596efd695ee: Pull complete 
d711e385449f: Pull complete 
Digest: sha256:f46c5561da64a4b67fa948769a4121f2b11c8e3ae892c6fdc970dfd1e4b1c881
Status: Downloaded newer image for ghcr.io/tus/tusd:v1.11.0
[tusd] 2023/04/12 00:53:20.703396 Using '/srv/tusd-data/data' as directory storage.
[tusd] 2023/04/12 00:53:20.707743 Using 0.00MB as maximum size.
[tusd] 2023/04/12 00:53:20.708465 Using '/srv/tusd-hooks' for hooks
[tusd] 2023/04/12 00:53:20.708909 Enabled hook events: pre-create, post-create, post-receive, post-terminate, post-finish
[tusd] 2023/04/12 00:53:20.710629 Using 0.0.0.0:1080 as address to listen.
[tusd] 2023/04/12 00:53:20.711050 Using /files/ as the base path.
[tusd] 2023/04/12 00:53:20.711546 Using /metrics as the metrics path.
[tusd] 2023/04/12 00:53:20.713466 Supported tus extensions: creation,creation-with-upload,termination,concatenation,creation-defer-length
[tusd] 2023/04/12 00:53:20.717347 You can now upload files to: http://0.0.0.0:1080/files/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants