Docker installation is not running

I’m using docker 18.09.0 and want to run grafana as a docker container.
Because I don’t have any internet access on my raspberry pi I downloaded the grafana image before with

sudo docker pull grafana/grafana
sudo docker save -o grafana_image.docker grafana/grafana

After that i transfered my image to my raspberry pi and loaded it with

sudo docker load -i grafana_image.docker

what worked well.

For the installation of grafana I’ve run the command

When I display all containers I can see my grafana container but without any port mapping.

When i display all running containers with

$ docker ps

I don’t see my grafana container.

What am I doing wrong?

Your container exited, so it is not running. Probably because you have downloaded wrong image with wrong architecture (probably amd64 but Raspberry is armX architecture). Check container logs. And find&download proper image for armX architecture.

Interesting. I thought it doesn’t matter what architecture I’m using because the container is running in my docker and not ‘directly’ on my host system?!

btw, I checked the log file:

standard_init_linux.go:207: exec user process caused “exec format error”

According to the official grafana image it supports ARM architecture. shouldn’t it works automatically so?

Only these platforms are available:

$ docker run --rm mplatform/mquery grafana/grafana
Image: grafana/grafana
 * Manifest List: Yes
 * Supported platforms:
   - linux/arm
   - linux/arm64
   - linux/amd64

Docker client pulls architecture based on its own env. I guess you was pulling image on PC -> linux/amd64 image has been pulled. Then you have imported linux/amd64 image to arm system -> that doesn’t work -> architecture matters. You can’t run binary files compiled for linux/amd64 on arm machine (= “exec format error”)

+ there is not only single arm architecture: armhf, arm7, arm6, ... - you need to use correct one.

The easiest option to resolve your problem is to pull and export image on the same architecture as your RP.

1 Like

What version of raspberry pi are you using? We have docker images for armv7 and arm64. You will have to download the correct image for your architecture just as @jangaraj explained. Docker is not a virtualization layer, the processes are actually running on your local machine, but jailed so that it doesn’t look like it to the container.

You most likely want the armv7 image. If you are running a first gen raspberry pi or a zero you will want an image for armv6, but we haven’t created an official one yet.

Arm images:

1 Like

thank you, it solved my problem! i’ve used https://hub.docker.com/r/grafana/grafana-arm32v7-linux for my raspberry pi 3+

1 Like

Is there still no plan to add an image for armv6? It seems like a great thing to be able to use a zero for this :slight_smile: