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 linux/arm64 build #68

Closed
aniston opened this issue Apr 26, 2023 · 11 comments · May be fixed by #69
Closed

docker linux/arm64 build #68

aniston opened this issue Apr 26, 2023 · 11 comments · May be fixed by #69

Comments

@aniston
Copy link

aniston commented Apr 26, 2023

The docker builds in linux/amd64 worked for the Frontend and Recorder and thanks for that.

While testing the ARM ARCH only the owntracks/frontend runs but cannot run the owntracks/recorder container as it does not have a linux/arm64 OS/ARCH with the container log error exec /usr/sbin/entrypoint.sh: exec format error

  • any chance of an official linux/arm64 arch for the owntracks/recorder ?
@jpmens
Copy link
Member

jpmens commented Apr 26, 2023

That sounds as though the hash-bang line isn't being recognized. entrypoint.sh contains

#!/bin/sh

in its first line.

Could you please show the output of these two commands?

$ ls -l /bin/sh
$ ls -lL /bin/sh

from inside the container?

@aniston
Copy link
Author

aniston commented Apr 26, 2023

@jpmens thanks for looking into the issue.

sadly i cannot run anything inside the container as it is not running or better still constantly restarting.
Error response from daemon: Container 71d430f4aa3adc8145701f760b8089940295f8184b8e642ab64c51b20e1c9976 is restarting, wait until the container is running

I used the following command on the container:
docker exec -it otrecorder "ls -l /bin/sh"

  • is there another way to run those commands on a container that is not starting or restating ?

If this helps , here is the only log line before the container restarts in a loop
2023-04-26T16:20:03.525424778Z exec /usr/sbin/entrypoint.sh: exec format error

@jpmens
Copy link
Member

jpmens commented Apr 27, 2023

Does this work?

docker run -it --entrypoint=/bin/sh otrecorder

Though if it does, then /bin/sh is there and it's executable so that will invalidate my earlier assumption that the shell is broken.

@jpmens
Copy link
Member

jpmens commented Apr 27, 2023

If you do get a shell, then please show the output of

cat /usr/sbin/entrypoint.sh
env

@juzam
Copy link
Collaborator

juzam commented Apr 27, 2023

2023-04-26T16:20:03.525424778Z exec /usr/sbin/entrypoint.sh: exec format error

This smells to me like an architecture mismatch i.e. you are running an Arm image on an amd64 host or vice versa.

@aniston
Copy link
Author

aniston commented Apr 28, 2023

you are running an Arm image on an amd64 host or vice versa.

yup exactly, that's the reason for the request for an arm64 build.

@aniston
Copy link
Author

aniston commented Apr 28, 2023

docker run -it --entrypoint=/bin/sh otrecorder

this does not work as per the same bild issue , ie: ARCH mismatch from pulled image incompability.
I paste the resulting error message from docker.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /bin/sh: exec format error

@aniston
Copy link
Author

aniston commented Apr 28, 2023

@jpmens I am using a Hetzner VPS with ARCH=ARM64 ARM Ampere CPU and sucessfully built the Docker image on the docker host using the Dockerfile on github with

docker buildx build -t otrecorder:arm64 github.com/owntracks/docker-recorder

this image runs correctly in the container, so if needed I can carry out some test here.

  • the host OS is linux aarch64 Debian GNU/Linux 11 (bullseye) with Kernel Version 5.10.0-21-arm64

EDIT: 20230501:
pushed my 'otrecorder' arm64 build to docker hub at cavia/otrecorder:arm64 if anyone wants to try that out under ARM cpu.

the Dockerfile is the same from owntracks/docker-recorder.

@jpmens
Copy link
Member

jpmens commented Oct 25, 2023

Apologies for this taking so long, but if I haven't messed this up, we now have Recorder images for ARM:

rabbit-10504

We'd appreciate your testing!

@jpmens
Copy link
Member

jpmens commented Oct 25, 2023

We have reports that these are working. Closing as completed.

@jpmens jpmens closed this as completed Oct 25, 2023
@aniston
Copy link
Author

aniston commented Mar 16, 2024

Apologies for this taking so long, but if I haven't messed this up, we now have Recorder images for ARM:

rabbit-10504

We'd appreciate your testing!

@jpmens , seen this message only today and tried out your official docker-recorder build, yes it works fine, I had till today resorted to using my own docker image at cavia/otrecorder for arm64 hence i forget to check this ticket. I confirm that on my ARM VPS at Hetzner it workes correctly, Thanks for the ARM64 image.

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