Use Java 11 in OH3 images and upgrade to Alpine v3.11 (#274)

Signed-off-by: Wouter Born <github@maindrain.net>
pull/277/head
Wouter Born 2020-01-29 14:36:22 +01:00 committed by GitHub
parent 60e02f3f7c
commit 057670ce6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
76 changed files with 764 additions and 357 deletions

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" \
OPENHAB_VERSION="1.8.3"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
RUN wget -nv -O /tmp/openhab.zip "${OPENHAB_URL}" && \

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" \
OPENHAB_VERSION="1.8.3"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
RUN wget -nv -O /tmp/openhab.zip "${OPENHAB_URL}" && \

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" \
OPENHAB_VERSION="1.8.3"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
RUN wget -nv -O /tmp/openhab.zip "${OPENHAB_URL}" && \

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" \
OPENHAB_VERSION="1.8.3"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" \
OPENHAB_VERSION="1.8.3"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" \
OPENHAB_VERSION="1.8.3"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" \
OPENHAB_VERSION="2.0.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" \
OPENHAB_VERSION="2.0.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" \
OPENHAB_VERSION="2.0.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" \
OPENHAB_VERSION="2.0.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" \
OPENHAB_VERSION="2.0.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" \
OPENHAB_VERSION="2.0.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" \
OPENHAB_VERSION="2.1.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" \
OPENHAB_VERSION="2.1.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" \
OPENHAB_VERSION="2.1.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" \
OPENHAB_VERSION="2.1.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" \
OPENHAB_VERSION="2.1.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" \
OPENHAB_VERSION="2.1.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.2.0%2Fopenhab-2.2.0.zip" \
OPENHAB_VERSION="2.2.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.2.0%2Fopenhab-2.2.0.zip" \
OPENHAB_VERSION="2.2.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.2.0%2Fopenhab-2.2.0.zip" \
OPENHAB_VERSION="2.2.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.2.0%2Fopenhab-2.2.0.zip" \
OPENHAB_VERSION="2.2.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.2.0%2Fopenhab-2.2.0.zip" \
OPENHAB_VERSION="2.2.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.2.0%2Fopenhab-2.2.0.zip" \
OPENHAB_VERSION="2.2.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip" \
OPENHAB_VERSION="2.3.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip" \
OPENHAB_VERSION="2.3.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip" \
OPENHAB_VERSION="2.3.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip" \
OPENHAB_VERSION="2.3.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip" \
OPENHAB_VERSION="2.3.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip" \
OPENHAB_VERSION="2.3.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.4.0%2Fopenhab-2.4.0.zip" \
OPENHAB_VERSION="2.4.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.4.0%2Fopenhab-2.4.0.zip" \
OPENHAB_VERSION="2.4.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.4.0%2Fopenhab-2.4.0.zip" \
OPENHAB_VERSION="2.4.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.4.0%2Fopenhab-2.4.0.zip" \
OPENHAB_VERSION="2.4.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.4.0%2Fopenhab-2.4.0.zip" \
OPENHAB_VERSION="2.4.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.4.0%2Fopenhab-2.4.0.zip" \
OPENHAB_VERSION="2.4.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.0%2Fopenhab-2.5.0.zip" \
OPENHAB_VERSION="2.5.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.0%2Fopenhab-2.5.0.zip" \
OPENHAB_VERSION="2.5.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.0%2Fopenhab-2.5.0.zip" \
OPENHAB_VERSION="2.5.0"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.0%2Fopenhab-2.5.0.zip" \
OPENHAB_VERSION="2.5.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.0%2Fopenhab-2.5.0.zip" \
OPENHAB_VERSION="2.5.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.0%2Fopenhab-2.5.0.zip" \
OPENHAB_VERSION="2.5.0"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.1%2Fopenhab-2.5.1.zip" \
OPENHAB_VERSION="2.5.1"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.1%2Fopenhab-2.5.1.zip" \
OPENHAB_VERSION="2.5.1"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,11 +6,12 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.1%2Fopenhab-2.5.1.zip" \
OPENHAB_VERSION="2.5.1"
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.1%2Fopenhab-2.5.1.zip" \
OPENHAB_VERSION="2.5.1"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.1%2Fopenhab-2.5.1.zip" \
OPENHAB_VERSION="2.5.1"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -11,6 +11,7 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
JAVA_VERSION="8" \
OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.1%2Fopenhab-2.5.1.zip" \
OPENHAB_VERSION="2.5.1"
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -6,12 +6,13 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:amd64-v3.10
FROM multiarch/alpine:amd64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" \
JAVA_VERSION="11" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
OPENHAB_VERSION="3.0.0-snapshot"
# Set variables and locales
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,12 +6,13 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:arm64-v3.10
FROM multiarch/alpine:arm64-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" \
JAVA_VERSION="11" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
OPENHAB_VERSION="3.0.0-snapshot"
# Set variables and locales
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -6,12 +6,13 @@
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
FROM multiarch/alpine:armhf-v3.10
FROM multiarch/alpine:armhf-v3.11
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu11.37.48-ca-jdk11.0.6-linux_aarch32hf.tar.gz" \
JAVA_VERSION="11" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
OPENHAB_VERSION="3.0.0-snapshot"
# Set variables and locales
@ -65,17 +66,20 @@ RUN apk upgrade --no-cache && \
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
chmod u+s /usr/sbin/arping && \
rm -rf /var/cache/apk/*
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
# Install openHAB
# Set permissions for openHAB. Export TERM variable. See issue #30 for details!

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -10,8 +10,9 @@ FROM multiarch/debian-debootstrap:amd64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz" \
JAVA_VERSION="11" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
OPENHAB_VERSION="3.0.0-snapshot"
# Set variables and locales
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -10,8 +10,9 @@ FROM multiarch/debian-debootstrap:arm64-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz" \
JAVA_VERSION="11" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
OPENHAB_VERSION="3.0.0-snapshot"
# Set variables and locales
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -10,8 +10,9 @@ FROM multiarch/debian-debootstrap:armhf-buster
# Set download urls
ENV \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
JAVA_URL="https://cdn.azul.com/zulu-embedded/bin/zulu11.37.48-ca-jdk11.0.6-linux_aarch32hf.tar.gz" \
JAVA_VERSION="11" \
OPENHAB_URL="https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-3.0.0-SNAPSHOT.zip" \
OPENHAB_VERSION="3.0.0-snapshot"
# Set variables and locales
@ -74,10 +75,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -84,7 +84,7 @@ Newer Docker versions (1.10.0+) have multi-architecture support which allows for
**Distributions:**
* `debian` for Debian 10 "buster" (default when not specified in tag)
* `alpine` for Alpine 3.10
* `alpine` for Alpine 3.11
The Alpine images are substantially smaller than the Debian images but may be less compatible because OpenJDK is used (see [Prerequisites](https://www.openhab.org/docs/installation/#prerequisites) for known disadvantages).

View File

@ -4,11 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -d "${JAVA_HOME}/jre/lib/security/policy/unlimited" ]; then
echo "Installing OpenJDK unlimited strength cryptography policy..."
mkdir "${JAVA_HOME}/jre/lib/security/policy/unlimited"
apk fix --no-cache openjdk8-jre-lib
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring OpenJDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "${JAVA_VERSION}" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -4,12 +4,15 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -euo pipefail
IFS=$'\n\t'
# Install Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ] && [ ! -f "${JAVA_HOME}/jre/lib/security/README.txt" ]; then
echo "Installing Zulu Cryptography Extension Kit (\"CEK\")..."
wget -q -O /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip
unzip -jo -d "${JAVA_HOME}/jre/lib/security" /tmp/ZuluJCEPolicies.zip
rm /tmp/ZuluJCEPolicies.zip
# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
echo "Configuring Zulu JDK ${JAVA_VERSION} unlimited strength cryptography policy..."
if [ "${JAVA_VERSION}" = "8" ]; then
java_security_file="${JAVA_HOME}/jre/lib/security/java.security"
elif [ "$JAVA_VERSION" = "11" ]; then
java_security_file="${JAVA_HOME}/conf/security/java.security"
fi
sed -i 's/^crypto.policy=limited/crypto.policy=unlimited/' "${java_security_file}"
fi
# Deleting instance.properties to avoid karaf PID conflict on restart

View File

@ -8,6 +8,7 @@ openhab1_release_url='https://bintray.com/artifact/download/openhab/bin/distribu
openhab2_release_url='https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F${version}%2Fopenhab-${version}.zip'
openhab2_milestone_url='https://openhab.jfrog.io/openhab/libs-milestone-local/org/openhab/distro/openhab/${version}/openhab-${version}.zip'
openhab2_snapshot_url='https://ci.openhab.org/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-${version}.zip'
openhab3_snapshot_url='https://ci.openhab.org/job/openHAB3-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-${version}.zip'
# Generate header
print_header() {
@ -33,9 +34,12 @@ print_baseimage() {
2.*.M*|2.*.RC*|3.*.M*|3.*.RC*)
openhab_url=$(eval "echo $openhab2_milestone_url")
;;
2.*-snapshot|3.*-snapshot)
2.*-snapshot)
openhab_url=$(eval "echo $openhab2_snapshot_url" | sed 's/snapshot/SNAPSHOT/g')
;;
3.*-snapshot)
openhab_url=$(eval "echo $openhab3_snapshot_url" | sed 's/snapshot/SNAPSHOT/g')
;;
2.*|3.*)
openhab_url=$(eval "echo $openhab2_release_url")
;;
@ -44,18 +48,44 @@ print_baseimage() {
;;
esac
# Set Java download based on architecture
case $arch in
amd64)
java_url="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz"
# Set download URL for openHAB version
case $version in
1.*|2.*)
java_version="8"
case $arch in
amd64)
java_url="https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz"
;;
armhf)
java_url="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz"
;;
arm64)
java_url="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz"
;;
default)
java_url="error"
;;
esac
;;
armhf)
java_url="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch32hf.tar.gz"
;;
arm64)
java_url="https://cdn.azul.com/zulu-embedded/bin/zulu8.42.0.195-ca-jdk1.8.0_232-linux_aarch64.tar.gz"
3.*)
java_version="11"
case $arch in
amd64)
java_url="https://cdn.azul.com/zulu/bin/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"
;;
armhf)
java_url="https://cdn.azul.com/zulu-embedded/bin/zulu11.37.48-ca-jdk11.0.6-linux_aarch32hf.tar.gz"
;;
arm64)
java_url="https://cdn.azul.com/zulu-embedded/bin/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"
;;
default)
java_url="error"
;;
esac
;;
default)
java_version="error"
java_url="error"
;;
esac
@ -63,7 +93,7 @@ print_baseimage() {
# Set Docker base image based on distributions
case $base in
alpine)
base_image="alpine:$arch-v3.10"
base_image="alpine:$arch-v3.11"
;;
debian)
base_image="debian-debootstrap:$arch-buster"
@ -79,6 +109,7 @@ print_baseimage() {
# Set download urls
ENV \\
JAVA_URL="$java_url" \\
JAVA_VERSION="$java_version" \\
OPENHAB_URL="$openhab_url" \\
OPENHAB_VERSION="$version"
@ -145,7 +176,7 @@ print_basepackages_alpine() {
su-exec \
tini \
ttf-dejavu \
openjdk8 \
openjdk${JAVA_VERSION} \
unzip \
wget \
zip && \
@ -186,10 +217,13 @@ EOI
# Configure Java for Alpine
print_java_alpine() {
cat >> $1 <<-'EOI'
# Limit OpenJDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/java-1.8-openjdk'
RUN rm -r "$JAVA_HOME/jre/lib/security/policy/unlimited" && \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "$JAVA_HOME/jre/lib/security/java.security"
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
RUN if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi
EOI
}
@ -197,10 +231,16 @@ EOI
print_java_debian() {
cat >> $1 <<-'EOI'
# Install java
ENV JAVA_HOME='/usr/lib/java-8'
ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
# Limit JDK crypto policy by default to comply with local laws which may prohibit use of unlimited strength cryptography
RUN wget -nv -O /tmp/java.tar.gz "${JAVA_URL}" && \
mkdir "${JAVA_HOME}" && \
mkdir -p "${JAVA_HOME}" && \
tar --exclude='demo' --exclude='sample' --exclude='src.zip' -xf /tmp/java.tar.gz --strip-components=1 -C "${JAVA_HOME}" && \
if [ "${JAVA_VERSION}" = "8" ]; then \
sed -i 's/^#crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/jre/lib/security/java.security"; \
elif [ "${JAVA_VERSION}" = "11" ]; then \
sed -i 's/^crypto.policy=unlimited/crypto.policy=limited/' "${JAVA_HOME}/conf/security/java.security"; \
fi && \
rm /tmp/java.tar.gz && \
update-alternatives --install /usr/bin/java java "${JAVA_HOME}/bin/java" 50 && \
update-alternatives --install /usr/bin/javac javac "${JAVA_HOME}/bin/javac" 50