question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running from raspberry pi with docker image getting error

See original GitHub issue

Describe the bug I think docker image for raspberry pi builded from wrong image

To Reproduce Steps to reproduce the behavior:

osmc@osmc:~$ sudo docker run -d --restart=always -p 8000:8000 --name=green-tunnel sadeghhayeri/green-tunnel:arm
ca2387d24d497b442ff5b7fa5415d19e0c21106ef1b788c7689588989e96e5df
osmc@osmc:~$ sudo docker ps
CONTAINER ID        IMAGE                           COMMAND                  CREATED             STATUS                         PORTS               NAMES
ca2387d24d49        sadeghhayeri/green-tunnel:arm   "/bin/sh -c 'node ./…"   24 seconds ago      Restarting (1) 4 seconds ago                       green-tunnel
osmc@osmc:~$ sudo docker logs -f --tail 10 green-tunnel
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"
standard_init_linux.go:211: exec user process caused "exec format error"

Expected behavior Container running without error

Additional context

  • OS: macOS Cataline v10.15.5
  • Docker: 19.03.11, build 42e35e6

My PR already merged on this but I think you forgot to uncomment it when build docker image with arm tag. Please update the image 🙏

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ardinusawancommented, Jun 15, 2020

Tested and it works! Thx mate 👍

1reaction
ardinusawancommented, Jun 11, 2020

Hmm I try on my pc and it works

Diff:

diff --git a/Dockerfile b/Dockerfile
index 61a0d4e..2b08406 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
-FROM mhart/alpine-node:12
+# FROM mhart/alpine-node:12
 # Use this instead to build image for Raspberry Pi
-# FROM balenalib/raspberry-pi-alpine-node
+FROM balenalib/raspberry-pi-alpine-node
 
 ENV PORT 8000
 ENV VERBOSE 'green-tunnel:*'

Build image:

➜  GreenTunnel git:(master) ✗ docker build -t green-tunnel --file Dockerfile .
Sending build context to Docker daemon  6.252MB
Step 1/13 : FROM balenalib/raspberry-pi-alpine-node
 ---> edb788ad0fb6
Step 2/13 : ENV PORT 8000
 ---> Using cache
 ---> c5c85d83255d
Step 3/13 : ENV VERBOSE 'green-tunnel:*'
 ---> Using cache
 ---> 2d718ca37434
Step 4/13 : ENV SILENT false
 ---> Using cache
 ---> 4af34d5e19d0
Step 5/13 : ENV DNS_TYPE 'https'
 ---> Using cache
 ---> a9823583e0d7
Step 6/13 : ENV DNS_SERVER 'https://cloudflare-dns.com/dns-query'
 ---> Using cache
 ---> d83ab441fa7b
Step 7/13 : WORKDIR /green-tunnel
 ---> Using cache
 ---> 4cd76191e464
Step 8/13 : COPY package*.json ./
 ---> Using cache
 ---> edc716b90658
Step 9/13 : RUN npm ci
 ---> Using cache
 ---> 33410717a282
Step 10/13 : COPY src ./src
 ---> Using cache
 ---> 07db647e2e49
Step 11/13 : COPY bin ./bin
 ---> Using cache
 ---> 8be83ee7201f
Step 12/13 : EXPOSE 8000/tcp
 ---> Using cache
 ---> cc4a4b57e16d
Step 13/13 : CMD node ./bin/gt.js       --verbose $VERBOSE      --ip 0.0.0.0    --port $PORT    --silent $SILENT        --system-proxy false    --dns-type $DNS_TYPE    --dns-server $DNS_SERVER
 ---> Using cache
 ---> deeab5a20583
Successfully built deeab5a20583
Successfully tagged green-tunnel:latest
Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker image fails to run on Raspberry Pi with strange Node ...
It kind of seems like Node is failing to get a valid time. What are you using as the base image for your...
Read more >
Raspberry PI Docker error: could not get iptables version #4292
Running the docker image on a Raspberry Pi ARMv6 results in this error: docker run -d --name=tailscaled --network=host -v /var/lib:/var/lib ...
Read more >
"exec format error" when trying to start a arm64 docker image ...
I am attempting to run a arm64 docker image: https://hub.docker.com/r/florider89/joplin-server/tags on a Raspberry Pi 4 with a 64 bit Debian ...
Read more >
error installing docker - Raspberry Pi Forums
Re: error installing docker​​ Wrong architecture of the container? Pi is ARM; you can't run x86/amd64 and similar containers.
Read more >
Running under Docker - Node-RED
This guide assumes you have some basic familiarity with Docker and the Docker Command Line. It describes some of the many ways Node-RED...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found