I need to install packages inside a container, where HA is installed
So I did following to acces the Container command line :
sudo docker exec -t -i homeassistant /bin/bash
And then I tried following :
bash-5.0# RUN apk update
bash: RUN: command not found
bash-5.0# apt-get update
bash: apt-get: command not found
bash-5.0# RUN apt-get update
bash: RUN: command not found
Is it possible to install something inside a container ?
In fact, I need “sendip” to be runned from my container. It’s OK outside :
pi@raspberrypi:~ $ sudo apt-get install sendip
Reading package lists... Done
Building dependency tree
Reading state information... Done
sendip is already the newest version (2.5-7).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
The home assistent containers are built on buildroot/ alpine linux, not debian, so apt-get will not work. Besides, it is not a good idea to try, first time you upgrade your extra packages will be gone.
Sorry but I not much help here.
I know it possible but never do myself. In link below they used script integration to login host from HA and run command.
For ssh we it look like he had weird way of setup but I realize now to setup ssh from docker to host you should
Generate rsa private/pub from host
Install both private and pub on host (private done automatically so you just need put public key)
Mount that private key file in ha docker container (- v pathtokey:/samepathindocker)
Ssh should work as ha has private key and host has public key