Upgrading from 4.6 to 5.2.4 docker trouble

I’m still fairly new to docker, but I have been having some trouble upgrading from 4.6 to 5.2 all while keeping my dashboards and plugins.

on my 4.6 install, my volumes look like this:

       "Mounts": [
               "Name": "30767be620f74d2b596dfb2858f1dd6228cd82aab7399a4ae13a3851f999a423",
               "Source": "/var/lib/docker/volumes/30767be620f74d2b596dfb2858f1dd6228cd82aab7399a4ae13a3851f999a423/_data",
               "Destination": "/etc/grafana",
               "Driver": "local",
               "Mode": "",
               "RW": true,
               "Propagation": ""
               "Name": "42890d8d6920fc061e3e510f8bc4a3670225f1e8d79ead0beed844af92c9a609",
               "Source": "/var/lib/docker/volumes/42890d8d6920fc061e3e510f8bc4a3670225f1e8d79ead0beed844af92c9a609/_data",
               "Destination": "/var/lib/grafana",
               "Driver": "local",
               "Mode": "",
               "RW": true,
               "Propagation": ""
               "Name": "0b94d64501044d22613092e837c7377abce4d1f9fa7f375a8a76ee2172a38f62",
               "Source": "/var/lib/docker/volumes/0b94d64501044d22613092e837c7377abce4d1f9fa7f375a8a76ee2172a38f62/_data",
               "Destination": "/var/log/grafana",
               "Driver": "local",
               "Mode": "",
               "RW": true,
               "Propagation": ""

so when I was trying to upgrade, I was hoping to mount the volumes accordingly using this command.

docker run -d \
    -p 3000:3000 \
    --name=grafana \
    -v 42890d8d6920fc061e3e510f8bc4a3670225f1e8d79ead0beed844af92c9a609:/var/lib/grafana \
    -v 0b94d64501044d22613092e837c7377abce4d1f9fa7f375a8a76ee2172a38f62:/var/log/gra
fana \
    -v 30767be620f74d2b596dfb2858f1dd6228cd82aab7399a4ae13a3851f999a423:/etc/grafana \
    --user 104 \
    9e623450219b /bin/bash

But it keeps exiting immediately with Exited (0) with no logs displayed after running docker logs grafana.

Again, Im still really new to docker - but is there something else that I’m missing?

As a side note, I have to install it using the image name (9e623450219b), there is a firewall that prevents it from connecting to the docker hub repository - so this image is side loaded.

Really I’m not too concerned with the dashboards - I have an export/import script that can restore them into the correct folder - what I am trying to keep are the plugins. Our Grafana server is so locked down I can neither connect to docker hub nor to the grafana plugins repository using grafana-cli (I have no idea how the person before me installed them).

I was trying to go around the security by downloading the grafana:latest image on my home computer, installing all the plugins I needed, commit the container to a new image, save it to a tarball, and then use docker load to put the image on our internal server.

But when I do that, I get an error message telling me that grafana-cli cannot connect to the Grafana Repository- which surprised me that grafana-cli still needed to connect to the grafana server even though the plugins were already installed.

Does anyone have any other ideas of how I can either point 5.4.2 to the /var/lib/grafana folder to keep the existing plugins, or how I can install the plugins into an image ahead of time so grafana-cli doesnt need to connect to the grafana plugin repository?

Here is the command to start the new container with previously installed plugins -

-bash-4.2$ docker run -d -p 3000:3000 --name grafana_plugs grafana/grafana:plugins

and here is the error message:

-bash-4.2$ docker logs grafana_plugs
Failed to send requesterrorGet https://grafana.com/api/plugins/repo/grafana-piechart-panel: dial tcp connect: connection refused
Error: ✗ Failed to send request. error: Get https://grafana.com/api/plugins/repo/grafana-piechart-panel: dial tcp connect: connection refused
   Grafana cli plugins install - install <plugin id> <plugin version (optional)>
   Grafana cli plugins install [arguments...]

Here is the command I used to create the container with the installed plugins -

docker run \
  -d \
  -p 3000:3000 \
  --name=grafana \
  -e "GF_INSTALL_PLUGINS=grafana-piechart-panel,digiapulssi-breadcrumb-panel,[etc]" \

and I feel like everything is installed correctly in the container as its 40 mb’s larger

grafana/grafana                 latest              243.6 MB
grafana/grafana                 plugins             287.3 MB

Alright I finally figured this out -

because I was installing it on one computer with this:

-e "GF_INSTALL_PLUGINS=grafana-piechart-panel,digiapulssi-breadcrumb-panel,[etc]" \

it was using that same call when I loaded the container on our internal grafana server - to fix it I just had to run the container with this command -

docker run -d -p 3000:3000 \
     --name grafana_plugins \

Now that I have a working image with the plugins installed I will just update the image with the new environmental variable.

haha thank you guys for being my rubber duckie :slight_smile: