Can't install addional packages on grafana ubuntu image

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    Install a few packages on the image to make it usable

  • How are you trying to achieve it?

docker run -d --name=grafana -p 3001:3000 -e "GF_INSTALL_PLUGINS=grafana-clickhouse-datasource" grafana/grafana-enterprise:9.4.2-ubuntu
docker container exec -it 75f9ec7a /bin/bash
grafana@75f9ec7a2493:/usr/share/grafana$ apt-get install ping
  • What happened?
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
  • What did you expect to happen?
    As I am in the root group I would expect to be able to install
grafana@75f9ec7a2493:/usr/share/grafana$ groups
  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

welcome to the grafana community forum :grafana: @thebravoman !

as root try:

docker exec --user="root" -it <containerID> /bin/bash

view from my terminal:

root@tony-virtual-machine:/home/tony# docker exec --user="root" -it grafana3 /bin/bash

then try to install the package

Note: in my case i had to run a apt update before i could apt-get install a package

good luck! :crossed_fingers: