How to run home assistant supervisor in a docker container

Hi,

I am new to home assistant. And what I want is to run home assistant supervisor as a docker container. Is there a way to do so ? I have gone through official documentation and for supervisor installation what they have provided is

and also few pre-requisites are also mentioned:

But these steps are mentioned to run HA supervisor on a full fledged os. But I want to run it inside a container.

Any help regarding this would be appreciated…

Hi, I did it with this manual:

Install Home Assistant (Supervised) on Debian

Basically the supervisor is a docker container. So you want to run the supervisor and the other containers inside an own docker container?
If so, pull an image of like debian or ubuntu, create a container of it and inside of it execute the install script.
But i have to ask why you want this? Running a bunch of docker containers inside a docker container would be redundant

Thanks for the reply @pedolsky
The link that you shared is something that will help install supervisor and other containers on host os. But I want to run supervisor and the other containers inside a docker container.

That’s why I posted the link above.

Would you pleas explain your reasons?

Hi @tenn0

Exactly what I want “supervisor and the other containers inside a docker container”. I tried that but for this I need to run docker engine inside the container as well. For this I tried to load local docker engine inside docker container by running the container as
docker run -it -v /var/run/docker.sock:/var/run/docker.sock homeassisttesting:latest

For the question that you asked “Why do I want to do this ?”. It is a requirement. The place where I want to run home assistant supervisor, I do not have access to host OS and I can only test this by loading this as an image on it. That is why I want to bundle the entire supervisor and other containers in my own container.

need to know more about your server before can give you some advice

Hi @KingRichard

You can consider the server as raspberry Pi. We create a tar package of our image and then do a “docker load” onto the raspberry pi and then run containers on it.

OK… RPI4 right?

you can try my script

You have to install docker in your docker container first. You basically have a VM of your linux installation, so you need to install all dependencies of HA supervised.
But wouldnt be a real VM be easier?

Hi @tenn0
As I told earlier, I do not have any option to do anything on the server(Raspberry Pi). I can just load the image on it. I can’t create a VM on it.