I just moved to docker and Ubuntu from my Pi3. I have a UPS that I want to run a test on from time to time, it is directly connected to the hassio host via usb and running Nut. All of that is working well.
The issue is that I need to issue the following commands to start and stop the test:
I am running the addon SSH & Web Terminal. From the provided integrated terminal the above commands work with protection mode off. But, if I drop into the homeassistant docker container with the Portainer shell and run the commands I get:
bash: docker: command not found
This is the error that appears in the logs when I try to issue the commands as a command line switch:
If you are in docker, the command gets issued in the docker container shell and not on the host. You need to ssh into the host and then issue the command.
Ok, so it works from the terminal window within home assistant if I have protection off in the addon SSH & Web Terminal. If protection is on I get the long message in the window telling me that protection is on and I can’t access other containers. If I drop into the container shell in portainer it does not see the docker command.
In order to be able to externally attach to the HA install, it wanted the addon wanted port 22. So, inorder to attach to the base os I set the base os on another port. This way I have ssh access to both.