Skip to content

Commit 67e0742

Browse files
Add openhab-cli and vim
Alpine: vim Debian: vim.tiny with symlink for vim Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
1 parent bdacfc1 commit 67e0742

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ENV \
2020
OPENHAB_HTTP_PORT="8080" \
2121
OPENHAB_HTTPS_PORT="8443" \
2222
OPENHAB_LOGDIR="/openhab/userdata/logs" \
23+
OPENHAB_RUNTIME="/openhab/runtime" \
2324
OPENHAB_USERDATA="/openhab/userdata" \
2425
USER_ID="9001"
2526

@@ -59,6 +60,7 @@ RUN apk update --no-cache && \
5960
ttf-dejavu \
6061
openjdk${JAVA_VERSION} \
6162
unzip \
63+
vim \
6264
wget \
6365
zip && \
6466
chmod u+s /usr/sbin/arping && \
@@ -87,6 +89,10 @@ RUN version="$(echo $OPENHAB_VERSION | sed 's/snapshot/SNAPSHOT/g')" && \
8789
COPY update ${OPENHAB_HOME}/runtime/bin/update
8890
RUN chmod +x ${OPENHAB_HOME}/runtime/bin/update
8991

92+
# Add openhab-cli script from openhab-linuxpkg repo
93+
RUN wget -nv -O /usr/bin/openhab-cli "https://raw.githubusercontent.com/openhab/openhab-linuxpkg/refs/heads/main/resources/usr/bin/openhab-cli" && \
94+
chmod +x /usr/bin/openhab-cli
95+
9096
# Expose volume with configuration and userdata dir
9197
VOLUME ${OPENHAB_CONF} ${OPENHAB_USERDATA} ${OPENHAB_HOME}/addons
9298

debian/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ENV \
2020
OPENHAB_HTTP_PORT="8080" \
2121
OPENHAB_HTTPS_PORT="8443" \
2222
OPENHAB_LOGDIR="/openhab/userdata/logs" \
23+
OPENHAB_RUNTIME="/openhab/runtime" \
2324
OPENHAB_USERDATA="/openhab/userdata" \
2425
USER_ID="9001"
2526

@@ -66,6 +67,7 @@ RUN apt-get update && \
6667
procps \
6768
tini \
6869
unzip \
70+
vim.tiny \
6971
wget \
7072
zip && \
7173
c_rehash && \
@@ -97,6 +99,11 @@ RUN version="$(echo $OPENHAB_VERSION | sed 's/snapshot/SNAPSHOT/g')" && \
9799
COPY update ${OPENHAB_HOME}/runtime/bin/update
98100
RUN chmod +x ${OPENHAB_HOME}/runtime/bin/update
99101

102+
# Add openhab-cli script from openhab-linuxpkg repo
103+
RUN wget -nv -O /usr/bin/openhab-cli "https://raw.githubusercontent.com/openhab/openhab-linuxpkg/refs/heads/main/resources/usr/bin/openhab-cli" && \
104+
chmod +x /usr/bin/openhab-cli && \
105+
ln -s /usr/bin/vim.tiny /usr/bin/vim
106+
100107
# Expose volume with configuration and userdata dir
101108
VOLUME ${OPENHAB_CONF} ${OPENHAB_USERDATA} ${OPENHAB_HOME}/addons
102109

0 commit comments

Comments
 (0)