Hassio with official 3rd party dockerhub images

I am looking to install Grafana and InfluxDB on hass.io.
I know there is an all-in-one approach as documented here: https://home-assistant.io/blog/2017/04/25/influxdb-grafana-docker/
But I would prefer to install using the official dockerhub images for the 3rd part components:
https://hub.docker.com/r/grafana/grafana/
https://hub.docker.com/_/influxdb/
These are updated more regularly than the AIO image, and also built on more space efficient base images.

I am comfortable to install via either approach directly in docker, but I would prefer to create hass.io addons for this.

So back to my original question: is there a correct way to use a pre-existing dockerhub image for a hass.io addon?
(as opposed to including a dockerfile in the addon to build an image)

Grafana and InfluxDB add-ons are already available at Repository: Bestlibre Addons repository.

To make your own add-on that points to a docker hub image, set the image key in config.json to the image on docker hub. Refer to https://home-assistant.io/developers/hassio/addon_config/ for more details on that.

Thanks.
I tried setting image in the config.json in a test addon but it didnt work.
Must have been something else wrong :slight_smile:

BTW looks like Bestlibre’s grafana is for arm arch only :frowning:
Still… armed with your advice I will progress with using the official grafana image from dockerhub…

You can also checkout my add-ons at https://github.com/notoriousbdg/hassio-addons for a couple more examples. The Gogs and Node-RED ones start with the official images from Docker hub and support armhf and amd64. I extended them to support config.json from hass.io.

I already have your node-red installed :slightly_smiling_face:
Now I just need to work out how to integrate it with HA…
I discussed it a bit in your repo thread… Repository: NotoriousBDG Add-Ons (Node-RED, HA Bridge, and Gogs)

I was thinking that, if a best practice HA <> Node-red integration is identified, the install of the node-red components for HA could be included in the hass.io addon so its integrated “out of the box”.

E.g. for node-red-contrib-home-assistant you dockerfile could install the node-red addon with (something like):

RUN cd ~/.node-red && npm install node-red-contrib-home-assistant

At one point, I had the Node-RED addon setup so it would install nodes that you define in the addons to be installed in the config. I ended up removing that because you can install them via the UI. I figured simpler was better, so I removed that feature.

Agree - KISS
But still there is the problem that I don’t know what to do to get nodered set up :slight_smile:

If needed I can try to make a version of the grafana addon for other arch, based on the official image.

I stole your config and altered it to pull the official image.

{
  "name": "Grafana",
  "version": "latest",
  "slug": "grafana",
  "image": "grafana/grafana",
  "description": "Grafana addon. Image used is grafana official",
  "url": "https://hub.docker.com/r/grafana/grafana/",
  "startup": "before",
  "boot": "auto",
  "ports": {
    "3000/tcp": 3000
  },
  "environment": {
    "GF_PATHS_DATA": "/data",
    "GF_PATHS_PLUGINS": "/data/plugins"
  },
  "arch": [
    "amd64"
  ],
  "options": {

  },
  "schema": {
  }
}

Not sure how you would make it so the addon config,json supports both architectures simultaneously, though.

https://github.com/home-assistant/hassio-addons/tree/master/snips

1 Like

Since I don’t have a Dockerfile for this addon, just a config file which set some environment values, I cannot use the multiple base image fonctionality. But since the addon is just a config.json, it is trivial to add it locally.

Perhaps a solution could be to use the multiple base image functiunality with a Dockerfile which does nothing… I will look into it.

I was reading it as that the dockerfile is a meta dockerfile, since it calls out to the existing images, which in turn were built by their own dockerfiles.

#armhf:FROM snipsdocker/platform:arm-0.4.3
#amd64:FROM snipsdocker/platform:x86-0.4.3

So rather than using image in the config.json, the images are specified in dockerfile.

following this pattern I assume we can create a dockerfile for grafana for both plaforms with something like:

#amd64:FROM grafana/grafana
#armhf:FROM fg2it/grafana-armhf

or something like that.
Of course taking from two different sources, potentially on different base images is probably a bad idea :smiley:
And as you say, building locally is easy…

Anyway. If anyone needs it, my repo now has x86 grafana:

I’ve tested it as far as installing and starting and checking that the grafana UI is operational…

amd64/armhf grafana support done here

My thanks sir!
I will deprecate my Grafana add-on in favour of your multi-arch version.

Hi,
i stumbled into this thread on my search for an integration of homegear in Hass.io.
Homegear (connection to Homematic devices) is available as a docker container (https://hub.docker.com/r/homegear/homegear/) - sorry for asking but i’m very new to this, is there a step-by-step guide to create a local addon for using the homegear docker container?
Thanks in advance!

@Vayain Did you make this work?

FWIW: I’ve built this: https://github.com/yeah/hassio-addons