diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 2e7e8471..e8db95e2 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -39,6 +39,7 @@ LABEL org.opencontainers.image.created=$BUILD_DATE \ # https://github.com/hadolint/hadolint/wiki/DL4006 SHELL ["/bin/ash", "-eo", "pipefail", "-c"] + # Install basepackages. Versions are "pinned" by using a pinned base image. # hadolint ignore=DL3018 RUN apk update --no-cache && \ @@ -57,10 +58,11 @@ RUN apk update --no-cache && \ tini \ ttf-dejavu \ openjdk${JAVA_VERSION} \ - nodejs \ unzip \ wget \ zip && \ + # Install NodeJS only for openHAB 5 SNAPSHOT + if [ $(echo $version | grep -E '^5\..+-SNAPSHOT$') ]; then apk add --no-cache nodejs; fi && \ chmod u+s /usr/sbin/arping && \ rm -rf /var/cache/apk/*