From aa3d82f215cfebf475b1dc8a78dcd087af5f4935 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Mon, 24 Feb 2025 23:57:18 +0100 Subject: [PATCH] Add openhab-cli and vim Alpine: vim Debian: vim-tiny with symlink for vim Signed-off-by: Holger Friedrich --- alpine/Dockerfile | 6 ++++++ debian/Dockerfile | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 6f13e862..34721b77 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -20,6 +20,7 @@ ENV \ OPENHAB_HTTP_PORT="8080" \ OPENHAB_HTTPS_PORT="8443" \ OPENHAB_LOGDIR="/openhab/userdata/logs" \ + OPENHAB_RUNTIME="/openhab/runtime" \ OPENHAB_USERDATA="/openhab/userdata" \ USER_ID="9001" @@ -59,6 +60,7 @@ RUN apk update --no-cache && \ ttf-dejavu \ openjdk${JAVA_VERSION} \ unzip \ + vim \ wget \ zip && \ chmod u+s /usr/sbin/arping && \ @@ -87,6 +89,10 @@ RUN version="$(echo $OPENHAB_VERSION | sed 's/snapshot/SNAPSHOT/g')" && \ COPY update ${OPENHAB_HOME}/runtime/bin/update RUN chmod +x ${OPENHAB_HOME}/runtime/bin/update +# Add openhab-cli script from openhab-linuxpkg repo +RUN wget -nv -O /usr/bin/openhab-cli "https://raw.githubusercontent.com/openhab/openhab-linuxpkg/refs/heads/main/resources/usr/bin/openhab-cli" && \ + chmod +x /usr/bin/openhab-cli + # Expose volume with configuration and userdata dir VOLUME ${OPENHAB_CONF} ${OPENHAB_USERDATA} ${OPENHAB_HOME}/addons diff --git a/debian/Dockerfile b/debian/Dockerfile index c8d62c4d..5cea78d4 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -20,6 +20,7 @@ ENV \ OPENHAB_HTTP_PORT="8080" \ OPENHAB_HTTPS_PORT="8443" \ OPENHAB_LOGDIR="/openhab/userdata/logs" \ + OPENHAB_RUNTIME="/openhab/runtime" \ OPENHAB_USERDATA="/openhab/userdata" \ USER_ID="9001" @@ -66,6 +67,7 @@ RUN apt-get update && \ procps \ tini \ unzip \ + vim-tiny \ wget \ zip && \ c_rehash && \ @@ -97,6 +99,11 @@ RUN version="$(echo $OPENHAB_VERSION | sed 's/snapshot/SNAPSHOT/g')" && \ COPY update ${OPENHAB_HOME}/runtime/bin/update RUN chmod +x ${OPENHAB_HOME}/runtime/bin/update +# Add openhab-cli script from openhab-linuxpkg repo +RUN wget -nv -O /usr/bin/openhab-cli "https://raw.githubusercontent.com/openhab/openhab-linuxpkg/refs/heads/main/resources/usr/bin/openhab-cli" && \ + chmod +x /usr/bin/openhab-cli && \ + ln -s /usr/bin/vim.tiny /usr/bin/vim + # Expose volume with configuration and userdata dir VOLUME ${OPENHAB_CONF} ${OPENHAB_USERDATA} ${OPENHAB_HOME}/addons