openhab-docker icon indicating copy to clipboard operation
openhab-docker copied to clipboard

Add openhab-cli and vim.tiny

Open holgerfriedrich opened this issue 10 months ago • 4 comments

Both were not part of the Docker images.

vim-tiny does only require 2 small additional dependencies on Debian, vim-nox is much larger. An additional symlink vim is added for convenience.

On Alpine, the package vim is much smaller and needs only two dependencies.

openhab-cli is directly downloaded from the linuxpkg repo. As that repo does not have version branches, this is just the current blob. To make it work, environment variable OPENHAB_RUNTIME is needed as well.

holgerfriedrich avatar Feb 24 '25 23:02 holgerfriedrich

@wborn WDYT about this one? Shall we add it?

holgerfriedrich avatar May 29 '25 19:05 holgerfriedrich

I'm not so sure. You can edit files using your favorite editor installed on the host. Looks like there will be issues when using openhab-cli in containers as some commands don't work when openHAB is running. When using Docker you'd rather create backups of volumes anyhow. Resetting permissions is done on startup as well.

wborn avatar May 30 '25 05:05 wborn

The feature I was missing is openhab-cli console. I needed to query my knx plugin, which has a console extension.

Is there a simple way to get it with the docker image?

Vim - fair point, I can remove it. But it won't hurt. Just a few KB.

holgerfriedrich avatar Jun 05 '25 20:06 holgerfriedrich

Is there a simple way to get it with the docker image?

If you want to get into the console from the host just use a script/alias that runs:

docker exec -it openhab /openhab/runtime/bin/client -p habopen

You can also configure the Karaf SSH server so you can use any SSH client to login to the console on the host or any machine.

wborn avatar Jun 15 '25 07:06 wborn