Install new app on docker

I am a newbie and have HASSIO running on VirtualBox on a windows machine which is running fine.

I know it has portainer and home assistant is running in a docker within the HASSIO system. I need to install an app from github that needs to be in a docker. unfortunately docker-compose doesnt work in hassio it says command not found which is strange as i can see dockers for ha and other add ons.

Please let me know if i can create a new docker via ssh on HASSIO and how i can do that.

Thanks for your help

I think you answered your own question.

It’s not possible to do what you want in HassOS.

As far as Portainer is concerned it isn’t installed by default in HassOS so you must have installed it as an add-on. Correct?

If the app isn’t available as add-on then I’ve heard there is a way for Portainer itself to create and deploy a new container but I’ve never done it myself and have no idea how it’s done.

I would look down that path and if you can’t do it that way then your only other recourse will be to install the “Home Assistant via generic Linux install”. It’s not gone yet.

you can add any docker via portainer in at least 2 ways. manually add each parameter via the gui or even easier using docker-compose.
select stack > new stack > copy the docker-compose elements > deploy !

2 Likes

Thanks Juan, thanks for the advice. I tried to use ‘Add Stack’ option. It has build method ‘Repository’ which i added my repository “https://github.com/ned-kelly/docker-voltronic-homeassistant”. This gives me error "yaml: unmarshall errors: line 1: cannot unmarshall !!str ‘3’ into config.RawService’

the git has version: '3 in the 1st line on the docker-compose.yaml. Either it cant read the file or i am doing something wrong.

I tried to create a docker by creating image. it has option to specify docker hub “bushrangers/ha-voltronic-mqtt” and then i create a container for this image.
And i am running it. It seems to be running. How do i change the config? I am supposed to change the json and conf files, where do you think they will be created?
i checked folder where the entrypoint.sh is stored i.e. /opt/inverter-mqtt and the files are not there. not sure what i am missing.

Thanks for your help

no you dont have to do that. see below snapshot example

I get the same error as i mentioned when i do it your way, i removed version and it gave me error on container_name. I have figured out what the problem is. it only supports compose version 2 as shown in image below.
I need to know what i need to update, the portainer, docker, etc. I get a get-apt update get-apt upgrade in hassos, it didn’t seen to make any difference.let me know what you think

Ignore above, it worked. all i did was change the first line from
version: ‘3’ to version ‘2’.

The docker is runnnig, i can see the container as well, its saying ‘unhealthy’. I need to update the json and conf files and that should fix it, where will i find them in the file system?

in the location where you mapped the volume to the host.
in this example
volumes:
- /mnt/cache/appdata/pihole:/etc/pihole
the files would be in the folder pihole in the host

Hi below, my docker-compose.yaml.

My container logs show “cat: /etc/inverter/mqtt.json: No such file or directory
Unable to connect (Lookup error.).” When i check there is no folder “/etc/inverter”


version: ‘2’
services:
voltronic-mqtt:
container_name: voltronic-mqtt
privileged: true
restart: always
volumes:
- ./config/:/etc/inverter/
devices:
- /dev/bus/usb:/dev/bus/usb:rwm
- /dev/ttyUSB0:/dev/ttyUSB0:rwm
- /dev/ttyUSB1:/dev/ttyUSB1:rwm
- /dev/ttyS0:/dev/ttyS0
- /dev/ttyS1:/dev/ttyS1
- /dev/ttyS2:/dev/ttyS2

I’m guessing your using this
https://hub.docker.com/r/bushrangers/ha-voltronic-mqtt/

seems you need two conf files

inverter.conf
mqtt.json

the docker cant find the mqtt one. The samples are in the repository.

you need to edit the files and copy them to your /.config folder which should be in your host user directory.

thanks @juan11perez, i was looking for the files in the filesystem and couldn’t find them. In my case there is no volume. I managed to edit the files by using the console in the container via portainer UI.

that’s ok but you’ll loose those changes when the container is updated or you do a host restart.
the volumes are mapped to the host, so that configuration information will persist regardeless.

hi @juan11perez, do you know how i can edit my docker-compose to create a volume? my current docker-compose is above.

As I already said your files are in the - ./config directory you created.
I don’t use hassos so I can’t tell you where it is.
SSH into hassos and look for it. I’ve read suggestions of /mnt/data

Hi.
Im trying to set this up.
I getting this issue and don’t know how to solve it

image

Hi.
I got past this but now I can’t figure out how to add my MQTT username and password in portainer.

Can anyone help?

How did you resolve read-only problem?

I temporarily set up a second pi3 just to talk to the inverter. I tried to enable port 22222 ssh, but that didn’t work. HENCE for a permanent solution, I am adding an SSD to my pi4 setting up docker and installing a docker for HASSIO and a second one for the inverter. Ideally one day we should have the inverter tool as an Add-On. but I don’t have time to do that.

I’m looking at doing what you have done, running docker container for the inverter stuff inside HassOS,

Did you get ii working with persistent config files etc?