Skip to content
Advertisement

Continuously restart container in Docker

I am working on ARMv7 Processor rev 2 (v7l) and I have some troubles with Docker.
I did soft link the Docker Root Directory to /media/sd (SD card). Now I am installing Grafana (software) on it. I have trouble with continuously restarting container on it.

This is what I did:

docker run -d -p 3000:3000 --name=grafana --restart=on-failure grafana/grafana

What I got? Logs from docker: (docker logs grafana):

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”
standard_init_linux.go:211: exec user process caused “exec format error”

Is there a way to fix things up?
I would be grateful.

Advertisement

Answer

Your problem is that you’re using the wrong architecture in your setup. I assume you’re either building the image on an amd64 machine and pushing this image on a remote system or pulling the image from an amd64 and transferring the image on a arm64 in a second stage.

In the first case, I suggest to build the image directly on the arm64 machine. In the second case, I suggest to pull the grafana image for that specific architecture. Check the grafana page https://hub.docker.com/r/grafana/grafana/tags to get the image digest. e.g. if you need to pull the image 7.2.0 for arm, you’ll need to use the pull command using the image and the sha digest (in this case sha256:8c8be98e7999106471369b914a8cb9205ac2b3c43cca2f4e5cc5c792e3fbfacd). In other words:

docker pull grafana/grafana@sha256:8c8be98e7999106471369b914a8cb9205ac2b3c43cca2f4e5cc5c792e3fbfacd

docker save -o grafana.tar grafana/grafana@sha256:8c8be98e7999106471369b914a8cb9205ac2b3c43cca2f4e5cc5c792e3fbfacd

transfer the files to the remote machine

docker load -i grafana.tar
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement