Skip to content

Add openhab-cli and vim.tiny #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -59,6 +60,7 @@ RUN apk update --no-cache && \
ttf-dejavu \
openjdk${JAVA_VERSION} \
unzip \
vim \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
Expand Down Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
OPENHAB_HTTP_PORT="8080" \
OPENHAB_HTTPS_PORT="8443" \
OPENHAB_LOGDIR="/openhab/userdata/logs" \
OPENHAB_RUNTIME="/openhab/runtime" \
OPENHAB_USERDATA="/openhab/userdata" \
USER_ID="9001"

Expand All @@ -41,7 +42,7 @@

# Install basepackages. Versions are "pinned" by using a pinned base image.
# hadolint ignore=DL3008
RUN apt-get update && \

Check failure on line 45 in debian/Dockerfile

View workflow job for this annotation

GitHub Actions / latest-debian

SC2143 style: Use grep -q instead of comparing output with [ -n .. ].

Check failure on line 45 in debian/Dockerfile

View workflow job for this annotation

GitHub Actions / snapshot-debian

SC2143 style: Use grep -q instead of comparing output with [ -n .. ].
apt-get upgrade --yes && \
openjdk_package="openjdk-${JAVA_VERSION}-jre-headless" && \
apt-get install --no-install-recommends -y --dry-run "$openjdk_package" >/dev/null || openjdk_package="temurin-${JAVA_VERSION}-jre" && \
Expand All @@ -66,6 +67,7 @@
procps \
tini \
unzip \
vim-tiny \
wget \
zip && \
c_rehash && \
Expand Down Expand Up @@ -97,6 +99,11 @@
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

Expand Down
Loading