From 174c56b3b8baa7f15d59000ed9c8c440f6e060f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 19:41:54 +0200 Subject: [PATCH 01/11] Add 2.1.0 and 2.2.0-SNAPSHOT Versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- .travis.yml | 9 +- 2.1.0/amd64/Dockerfile | 95 ++++++++++++++++ {2.1.0-snapshot => 2.1.0}/amd64/entrypoint.sh | 0 2.1.0/arm64/Dockerfile | 101 ++++++++++++++++++ {2.1.0-snapshot => 2.1.0}/arm64/entrypoint.sh | 0 2.1.0/armhf/Dockerfile | 95 ++++++++++++++++ {2.1.0-snapshot => 2.1.0}/armhf/entrypoint.sh | 0 .../amd64/Dockerfile | 4 +- 2.2.0-snapshot/amd64/entrypoint.sh | 59 ++++++++++ .../arm64/Dockerfile | 4 +- 2.2.0-snapshot/arm64/entrypoint.sh | 59 ++++++++++ .../armhf/Dockerfile | 4 +- 2.2.0-snapshot/armhf/entrypoint.sh | 59 ++++++++++ update.sh | 9 +- 14 files changed, 486 insertions(+), 12 deletions(-) create mode 100644 2.1.0/amd64/Dockerfile rename {2.1.0-snapshot => 2.1.0}/amd64/entrypoint.sh (100%) mode change 100755 => 100644 create mode 100644 2.1.0/arm64/Dockerfile rename {2.1.0-snapshot => 2.1.0}/arm64/entrypoint.sh (100%) mode change 100755 => 100644 create mode 100644 2.1.0/armhf/Dockerfile rename {2.1.0-snapshot => 2.1.0}/armhf/entrypoint.sh (100%) mode change 100755 => 100644 rename {2.1.0-snapshot => 2.2.0-snapshot}/amd64/Dockerfile (97%) create mode 100644 2.2.0-snapshot/amd64/entrypoint.sh rename {2.1.0-snapshot => 2.2.0-snapshot}/arm64/Dockerfile (98%) create mode 100644 2.2.0-snapshot/arm64/entrypoint.sh rename {2.1.0-snapshot => 2.2.0-snapshot}/armhf/Dockerfile (97%) create mode 100644 2.2.0-snapshot/armhf/entrypoint.sh diff --git a/.travis.yml b/.travis.yml index e0622596..67294cb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,12 @@ env: - TARGET=amd64 VERSION=2.0.0 - TARGET=armhf VERSION=2.0.0 - TARGET=arm64 VERSION=2.0.0 - - TARGET=amd64 VERSION=2.1.0-snapshot - - TARGET=armhf VERSION=2.1.0-snapshot - - TARGET=arm64 VERSION=2.1.0-snapshot + - TARGET=amd64 VERSION=2.1.0 + - TARGET=armhf VERSION=2.1.0 + - TARGET=arm64 VERSION=2.1.0 + - TARGET=amd64 VERSION=2.2.0-snapshot + - TARGET=armhf VERSION=2.2.0-snapshot + - TARGET=arm64 VERSION=2.2.0-snapshot matrix: fast_finish: true diff --git a/2.1.0/amd64/Dockerfile b/2.1.0/amd64/Dockerfile new file mode 100644 index 00000000..1d8c247a --- /dev/null +++ b/2.1.0/amd64/Dockerfile @@ -0,0 +1,95 @@ +# openhab image +# +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# + +FROM multiarch/debian-debootstrap:amd64-jessie + +# Set download urls +ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" +ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" +ENV OPENHAB_VERSION="2.1.0" + +# Set variables +ENV \ + APPDIR="/openhab" \ + DEBIAN_FRONTEND=noninteractive \ + EXTRA_JAVA_OPTS="" \ + JAVA_HOME='/usr/lib/java-8' \ + OPENHAB_HTTP_PORT="8080" \ + OPENHAB_HTTPS_PORT="8443" + +# Basic build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG VCS_REF +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.docker.dockerfile="/Dockerfile" \ + org.label-schema.license="EPL" \ + org.label-schema.name="openHAB" \ + org.label-schema.url="http://www.openhab.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git" + +# Install basepackages +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + fontconfig \ + locales \ + locales-all \ + libpcap-dev \ + netbase \ + unzip \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Set locales +ENV \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + +# Install java +RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\ + mkdir ${JAVA_HOME} && \ + tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME} && \ + update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 50 && \ + update-alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac 50 + +# Install gosu +ENV GOSU_VERSION 1.10 +RUN set -x \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +# Install openhab +# Set permissions for openhab. Export TERM variable. See issue #30 for details! +RUN wget -nv -O /tmp/openhab.zip ${OPENHAB_URL} &&\ + unzip -q /tmp/openhab.zip -d ${APPDIR} &&\ + rm /tmp/openhab.zip &&\ + mkdir -p ${APPDIR}/userdata/logs &&\ + touch ${APPDIR}/userdata/logs/openhab.log && \ + cp -a ${APPDIR}/userdata ${APPDIR}/userdata.dist && \ + cp -a ${APPDIR}/conf ${APPDIR}/conf.dist && \ + echo "export TERM=dumb" | tee -a ~/.bashrc + +# Expose volume with configuration and userdata dir +VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons + +# Execute command +WORKDIR ${APPDIR} +EXPOSE 8080 8443 5555 +COPY entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] +CMD ["gosu", "openhab", "./start.sh"] + diff --git a/2.1.0-snapshot/amd64/entrypoint.sh b/2.1.0/amd64/entrypoint.sh old mode 100755 new mode 100644 similarity index 100% rename from 2.1.0-snapshot/amd64/entrypoint.sh rename to 2.1.0/amd64/entrypoint.sh diff --git a/2.1.0/arm64/Dockerfile b/2.1.0/arm64/Dockerfile new file mode 100644 index 00000000..d590d1a4 --- /dev/null +++ b/2.1.0/arm64/Dockerfile @@ -0,0 +1,101 @@ +# openhab image +# +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# + +FROM multiarch/debian-debootstrap:arm64-jessie + +# Set download urls +ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" +ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" +ENV OPENHAB_VERSION="2.1.0" + +# Set variables +ENV \ + APPDIR="/openhab" \ + DEBIAN_FRONTEND=noninteractive \ + EXTRA_JAVA_OPTS="" \ + JAVA_HOME='/usr/lib/java-8' \ + OPENHAB_HTTP_PORT="8080" \ + OPENHAB_HTTPS_PORT="8443" + +# Basic build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG VCS_REF +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.docker.dockerfile="/Dockerfile" \ + org.label-schema.license="EPL" \ + org.label-schema.name="openHAB" \ + org.label-schema.url="http://www.openhab.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git" + +# Install basepackages +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + fontconfig \ + locales \ + locales-all \ + libpcap-dev \ + netbase \ + unzip \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Set locales +ENV \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + +RUN dpkg --add-architecture armhf && \ + apt-get update && \ + apt-get install --no-install-recommends -y \ + libc6:armhf \ + && rm -rf /var/lib/apt/lists/* + +# Install java +RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\ + mkdir ${JAVA_HOME} && \ + tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME} && \ + update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 50 && \ + update-alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac 50 + +# Install gosu +ENV GOSU_VERSION 1.10 +RUN set -x \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +# Install openhab +# Set permissions for openhab. Export TERM variable. See issue #30 for details! +RUN wget -nv -O /tmp/openhab.zip ${OPENHAB_URL} &&\ + unzip -q /tmp/openhab.zip -d ${APPDIR} &&\ + rm /tmp/openhab.zip &&\ + mkdir -p ${APPDIR}/userdata/logs &&\ + touch ${APPDIR}/userdata/logs/openhab.log && \ + cp -a ${APPDIR}/userdata ${APPDIR}/userdata.dist && \ + cp -a ${APPDIR}/conf ${APPDIR}/conf.dist && \ + echo "export TERM=dumb" | tee -a ~/.bashrc + +# Expose volume with configuration and userdata dir +VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons + +# Execute command +WORKDIR ${APPDIR} +EXPOSE 8080 8443 5555 +COPY entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] +CMD ["gosu", "openhab", "./start.sh"] + diff --git a/2.1.0-snapshot/arm64/entrypoint.sh b/2.1.0/arm64/entrypoint.sh old mode 100755 new mode 100644 similarity index 100% rename from 2.1.0-snapshot/arm64/entrypoint.sh rename to 2.1.0/arm64/entrypoint.sh diff --git a/2.1.0/armhf/Dockerfile b/2.1.0/armhf/Dockerfile new file mode 100644 index 00000000..8c51f23f --- /dev/null +++ b/2.1.0/armhf/Dockerfile @@ -0,0 +1,95 @@ +# openhab image +# +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# + +FROM multiarch/debian-debootstrap:armhf-jessie + +# Set download urls +ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" +ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" +ENV OPENHAB_VERSION="2.1.0" + +# Set variables +ENV \ + APPDIR="/openhab" \ + DEBIAN_FRONTEND=noninteractive \ + EXTRA_JAVA_OPTS="" \ + JAVA_HOME='/usr/lib/java-8' \ + OPENHAB_HTTP_PORT="8080" \ + OPENHAB_HTTPS_PORT="8443" + +# Basic build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG VCS_REF +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.docker.dockerfile="/Dockerfile" \ + org.label-schema.license="EPL" \ + org.label-schema.name="openHAB" \ + org.label-schema.url="http://www.openhab.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git" + +# Install basepackages +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + fontconfig \ + locales \ + locales-all \ + libpcap-dev \ + netbase \ + unzip \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Set locales +ENV \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + +# Install java +RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\ + mkdir ${JAVA_HOME} && \ + tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME} && \ + update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 50 && \ + update-alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac 50 + +# Install gosu +ENV GOSU_VERSION 1.10 +RUN set -x \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +# Install openhab +# Set permissions for openhab. Export TERM variable. See issue #30 for details! +RUN wget -nv -O /tmp/openhab.zip ${OPENHAB_URL} &&\ + unzip -q /tmp/openhab.zip -d ${APPDIR} &&\ + rm /tmp/openhab.zip &&\ + mkdir -p ${APPDIR}/userdata/logs &&\ + touch ${APPDIR}/userdata/logs/openhab.log && \ + cp -a ${APPDIR}/userdata ${APPDIR}/userdata.dist && \ + cp -a ${APPDIR}/conf ${APPDIR}/conf.dist && \ + echo "export TERM=dumb" | tee -a ~/.bashrc + +# Expose volume with configuration and userdata dir +VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons + +# Execute command +WORKDIR ${APPDIR} +EXPOSE 8080 8443 5555 +COPY entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] +CMD ["gosu", "openhab", "./start.sh"] + diff --git a/2.1.0-snapshot/armhf/entrypoint.sh b/2.1.0/armhf/entrypoint.sh old mode 100755 new mode 100644 similarity index 100% rename from 2.1.0-snapshot/armhf/entrypoint.sh rename to 2.1.0/armhf/entrypoint.sh diff --git a/2.1.0-snapshot/amd64/Dockerfile b/2.2.0-snapshot/amd64/Dockerfile similarity index 97% rename from 2.1.0-snapshot/amd64/Dockerfile rename to 2.2.0-snapshot/amd64/Dockerfile index 525f7643..7f04dfbb 100644 --- a/2.1.0-snapshot/amd64/Dockerfile +++ b/2.2.0-snapshot/amd64/Dockerfile @@ -11,8 +11,8 @@ FROM multiarch/debian-debootstrap:amd64-jessie # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" -ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" -ENV OPENHAB_VERSION="2.1.0-snapshot" +ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" +ENV OPENHAB_VERSION="2.2.0-snapshot" # Set variables ENV \ diff --git a/2.2.0-snapshot/amd64/entrypoint.sh b/2.2.0-snapshot/amd64/entrypoint.sh new file mode 100644 index 00000000..0fa1a4dc --- /dev/null +++ b/2.2.0-snapshot/amd64/entrypoint.sh @@ -0,0 +1,59 @@ +#!/bin/bash -x +set -euo pipefail +IFS=$'\n\t' + +# Add openhab user & handle possible device groups for different host systems +# Container base image puts dialout on group id 20, uucp on id 10 +# GPIO Group for RPI access +NEW_USER_ID=${USER_ID:-9001} +echo "Starting with openhab user id: $NEW_USER_ID" +if ! id -u openhab >/dev/null 2>&1; then + echo "Create user openhab with id 9001" + adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ + groupadd -g 14 uucp2 &&\ + groupadd -g 16 dialout2 &&\ + groupadd -g 18 dialout3 &&\ + groupadd -g 32 uucp3 &&\ + groupadd -g 997 gpio &&\ + adduser openhab dialout &&\ + adduser openhab uucp &&\ + adduser openhab uucp2 &&\ + adduser openhab dialout2 &&\ + adduser openhab dialout3 &&\ + adduser openhab uucp3 &&\ + adduser openhab gpio +fi + +# Copy initial files to host volume +case ${OPENHAB_VERSION} in + 1.8.3) + if [ -z "$(ls -A "${APPDIR}/configurations")" ]; then + # Copy userdata dir for version 1.8.3 + echo "No configuration found... initializing." + cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" + fi + ;; + 2.0.0|2.1.0-snapshot) + # Initialize empty host volumes + if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No userdata found... initializing." + cp -av "${APPDIR}/userdata.dist/." "${APPDIR}/userdata/" + fi + + if [ -z "$(ls -A "${APPDIR}/conf")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No configuration found... initializing." + cp -av "${APPDIR}/conf.dist/." "${APPDIR}/conf/" + fi + ;; + *) + echo openHAB version ${OPENHAB_VERSION} not supported! + ;; +esac + +# Set openhab folder permission +chown -R openhab:openhab ${APPDIR} + +exec "$@" + diff --git a/2.1.0-snapshot/arm64/Dockerfile b/2.2.0-snapshot/arm64/Dockerfile similarity index 98% rename from 2.1.0-snapshot/arm64/Dockerfile rename to 2.2.0-snapshot/arm64/Dockerfile index 9a815c6d..627406f6 100644 --- a/2.1.0-snapshot/arm64/Dockerfile +++ b/2.2.0-snapshot/arm64/Dockerfile @@ -11,8 +11,8 @@ FROM multiarch/debian-debootstrap:arm64-jessie # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" -ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" -ENV OPENHAB_VERSION="2.1.0-snapshot" +ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" +ENV OPENHAB_VERSION="2.2.0-snapshot" # Set variables ENV \ diff --git a/2.2.0-snapshot/arm64/entrypoint.sh b/2.2.0-snapshot/arm64/entrypoint.sh new file mode 100644 index 00000000..0fa1a4dc --- /dev/null +++ b/2.2.0-snapshot/arm64/entrypoint.sh @@ -0,0 +1,59 @@ +#!/bin/bash -x +set -euo pipefail +IFS=$'\n\t' + +# Add openhab user & handle possible device groups for different host systems +# Container base image puts dialout on group id 20, uucp on id 10 +# GPIO Group for RPI access +NEW_USER_ID=${USER_ID:-9001} +echo "Starting with openhab user id: $NEW_USER_ID" +if ! id -u openhab >/dev/null 2>&1; then + echo "Create user openhab with id 9001" + adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ + groupadd -g 14 uucp2 &&\ + groupadd -g 16 dialout2 &&\ + groupadd -g 18 dialout3 &&\ + groupadd -g 32 uucp3 &&\ + groupadd -g 997 gpio &&\ + adduser openhab dialout &&\ + adduser openhab uucp &&\ + adduser openhab uucp2 &&\ + adduser openhab dialout2 &&\ + adduser openhab dialout3 &&\ + adduser openhab uucp3 &&\ + adduser openhab gpio +fi + +# Copy initial files to host volume +case ${OPENHAB_VERSION} in + 1.8.3) + if [ -z "$(ls -A "${APPDIR}/configurations")" ]; then + # Copy userdata dir for version 1.8.3 + echo "No configuration found... initializing." + cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" + fi + ;; + 2.0.0|2.1.0-snapshot) + # Initialize empty host volumes + if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No userdata found... initializing." + cp -av "${APPDIR}/userdata.dist/." "${APPDIR}/userdata/" + fi + + if [ -z "$(ls -A "${APPDIR}/conf")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No configuration found... initializing." + cp -av "${APPDIR}/conf.dist/." "${APPDIR}/conf/" + fi + ;; + *) + echo openHAB version ${OPENHAB_VERSION} not supported! + ;; +esac + +# Set openhab folder permission +chown -R openhab:openhab ${APPDIR} + +exec "$@" + diff --git a/2.1.0-snapshot/armhf/Dockerfile b/2.2.0-snapshot/armhf/Dockerfile similarity index 97% rename from 2.1.0-snapshot/armhf/Dockerfile rename to 2.2.0-snapshot/armhf/Dockerfile index ffe78679..1f7dc4e2 100644 --- a/2.1.0-snapshot/armhf/Dockerfile +++ b/2.2.0-snapshot/armhf/Dockerfile @@ -11,8 +11,8 @@ FROM multiarch/debian-debootstrap:armhf-jessie # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" -ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" -ENV OPENHAB_VERSION="2.1.0-snapshot" +ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" +ENV OPENHAB_VERSION="2.2.0-snapshot" # Set variables ENV \ diff --git a/2.2.0-snapshot/armhf/entrypoint.sh b/2.2.0-snapshot/armhf/entrypoint.sh new file mode 100644 index 00000000..0fa1a4dc --- /dev/null +++ b/2.2.0-snapshot/armhf/entrypoint.sh @@ -0,0 +1,59 @@ +#!/bin/bash -x +set -euo pipefail +IFS=$'\n\t' + +# Add openhab user & handle possible device groups for different host systems +# Container base image puts dialout on group id 20, uucp on id 10 +# GPIO Group for RPI access +NEW_USER_ID=${USER_ID:-9001} +echo "Starting with openhab user id: $NEW_USER_ID" +if ! id -u openhab >/dev/null 2>&1; then + echo "Create user openhab with id 9001" + adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ + groupadd -g 14 uucp2 &&\ + groupadd -g 16 dialout2 &&\ + groupadd -g 18 dialout3 &&\ + groupadd -g 32 uucp3 &&\ + groupadd -g 997 gpio &&\ + adduser openhab dialout &&\ + adduser openhab uucp &&\ + adduser openhab uucp2 &&\ + adduser openhab dialout2 &&\ + adduser openhab dialout3 &&\ + adduser openhab uucp3 &&\ + adduser openhab gpio +fi + +# Copy initial files to host volume +case ${OPENHAB_VERSION} in + 1.8.3) + if [ -z "$(ls -A "${APPDIR}/configurations")" ]; then + # Copy userdata dir for version 1.8.3 + echo "No configuration found... initializing." + cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" + fi + ;; + 2.0.0|2.1.0-snapshot) + # Initialize empty host volumes + if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No userdata found... initializing." + cp -av "${APPDIR}/userdata.dist/." "${APPDIR}/userdata/" + fi + + if [ -z "$(ls -A "${APPDIR}/conf")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No configuration found... initializing." + cp -av "${APPDIR}/conf.dist/." "${APPDIR}/conf/" + fi + ;; + *) + echo openHAB version ${OPENHAB_VERSION} not supported! + ;; +esac + +# Set openhab folder permission +chown -R openhab:openhab ${APPDIR} + +exec "$@" + diff --git a/update.sh b/update.sh index 9f0615fd..302c1b79 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,7 @@ set -eo pipefail # Dockerfiles to be generated -versions="2.1.0-snapshot 2.0.0 1.8.3" +versions="2.2.0-snapshot 2.1.0 2.0.0 1.8.3" arches="amd64 armhf arm64" # Generate header @@ -24,8 +24,11 @@ print_header() { print_baseimage() { # Set download url for openhab version case $version in - 2.1.0-snapshot) - openhab_url="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" + 2.2.0-snapshot) + openhab_url="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" + ;; + 2.1.0) + openhab_url="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" ;; 2.0.0) openhab_url="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" From bebbeaf26ed0f36f2b8a059b3bb00957d700f84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 19:53:22 +0200 Subject: [PATCH 02/11] Update README to Version 2.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3fb1f6c4..51d69b5d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # openHAB2 Docker Containers ![](https://github.com/openhab/openhab-docker/raw/master/images/openhab.png) -[![Build state](https://travis-ci.org/openhab/openhab-docker.svg?branch=master)](https://travis-ci.org/openhab/openhab-docker) [![](https://images.microbadger.com/badges/image/openhab/openhab:2.0.0-amd64.svg)](https://microbadger.com/images/openhab/openhab:2.0.0-amd64 "Get your own image badge on microbadger.com") [![Docker Label](https://images.microbadger.com/badges/version/openhab/openhab:2.0.0-amd64.svg)](https://microbadger.com/#/images/openhab/openhab:2.0.0-amd64) [![Docker Stars](https://img.shields.io/docker/stars/openhab/openhab.svg?maxAge=2592000)](https://hub.docker.com/r/openhab/openhab/) [![Docker Pulls](https://img.shields.io/docker/pulls/openhab/openhab.svg?maxAge=2592000)](https://hub.docker.com/r/openhab/openhab/) [![Join the chat at https://gitter.im/openhab/openhab-docker](https://badges.gitter.im/openhab/openhab-docker.svg)](https://gitter.im/openhab/openhab-docker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build state](https://travis-ci.org/openhab/openhab-docker.svg?branch=master)](https://travis-ci.org/openhab/openhab-docker) [![](https://images.microbadger.com/badges/image/openhab/openhab:2.1.0-amd64.svg)](https://microbadger.com/images/openhab/openhab:2.1.0-amd64 "Get your own image badge on microbadger.com") [![Docker Label](https://images.microbadger.com/badges/version/openhab/openhab:2.1.0-amd64.svg)](https://microbadger.com/#/images/openhab/openhab:2.1.0-amd64) [![Docker Stars](https://img.shields.io/docker/stars/openhab/openhab.svg?maxAge=2592000)](https://hub.docker.com/r/openhab/openhab/) [![Docker Pulls](https://img.shields.io/docker/pulls/openhab/openhab.svg?maxAge=2592000)](https://hub.docker.com/r/openhab/openhab/) [![Join the chat at https://gitter.im/openhab/openhab-docker](https://badges.gitter.im/openhab/openhab-docker.svg)](https://gitter.im/openhab/openhab-docker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub issues](https://img.shields.io/github/issues/openhab/openhab-docker.svg)](https://github.com/openhab/openhab-docker/issues) [![Issue Stats](http://www.issuestats.com/github/openhab/openhab-docker/badge/issue?style=flat)](http://www.issuestats.com/github/openhab/openhab-docker) [![GitHub forks](https://img.shields.io/github/forks/openhab/openhab-docker.svg)](https://github.com/openhab/openhab-docker/network) [![Issue Stats](http://www.issuestats.com/github/openhab/openhab-docker/badge/pr?style=flat)](http://www.issuestats.com/github/openhab/openhab-docker) [![GitHub stars](https://img.shields.io/github/stars/openhab/openhab-docker.svg)](https://github.com/openhab/openhab-docker/stargazers) @@ -34,9 +34,10 @@ Repository for building Docker containers for [openHAB](http://openhab.org) (Hom **Version** -* [``1.8.3`` Stable openHAB 1 version](https://github.com/openhab/openhab-docker/blob/master/1.8.3/amd64/Dockerfile) -* [``2.0.0`` Stable openHAB 2 version](https://github.com/openhab/openhab-docker/blob/master/2.0.0/amd64/Dockerfile) -* [``2.1.0-snapshot`` Experimental openHAB 2 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.1.0-snapshot/amd64/Dockerfile) +* [``1.8.3`` Stable openHAB 1.8 version](https://github.com/openhab/openhab-docker/blob/master/1.8.3/amd64/Dockerfile) +* [``2.0.0`` Stable openHAB 2.0 version](https://github.com/openhab/openhab-docker/blob/master/2.0.0/amd64/Dockerfile) +* [``2.1.0`` Stable openHAB 2.1 version](https://github.com/openhab/openhab-docker/blob/master/2.1.0/amd64/Dockerfile) +* [``2.2.0-snapshot`` Experimental openHAB 2.2 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.2.0-snapshot/amd64/Dockerfile) **Architecture:** @@ -44,7 +45,7 @@ Repository for building Docker containers for [openHAB](http://openhab.org) (Hom * ``armhf`` for ARMv7 devices 32 Bit (e.g. most RaspberryPi 1/2/3) * ``arm64`` for ARMv8 devices 64 Bit (not RaspberryPi 3) -If you are unsure about what your needs are, you probably want to use ``openhab/openhab:2.0.0-amd64``. +If you are unsure about what your needs are, you probably want to use ``openhab/openhab:2.1.0-amd64``. Prebuilt Docker Images can be found here: [Docker Images](https://hub.docker.com/r/openhab/openhab) @@ -54,7 +55,7 @@ Prebuilt Docker Images can be found here: [Docker Images](https://hub.docker.com The following will run openHAB in demo mode on the host machine: ``` -docker run -it --name openhab --net=host openhab/openhab:2.0.0-amd64 +docker run -it --name openhab --net=host openhab/openhab:2.1.0-amd64 ``` _**NOTE:** Although this is the simplest method to getting openHAB up and running, but it is not the prefered method. To properly run the container, please specify a **host volume** for the directories._ @@ -75,7 +76,7 @@ docker run \ -v openhab_userdata:/openhab/userdata \ -d \ --restart=always \ - openhab/openhab:2.0.0-amd64 + openhab/openhab:2.1.0-amd64 ``` #### Running from compose-file.yml @@ -84,7 +85,7 @@ Create the following ``docker-compose.yml`` and start the container with ``docke ```YAML openhab: - image: "openhab/openhab:2.0.0-amd64" + image: "openhab/openhab:2.1.0-amd64" restart: always net: host volumes: @@ -105,7 +106,7 @@ You can run all openHAB images with libpcap support. This enables you to use the ```YAML openhab: container_name: openhab - image: "openhab/openhab:2.0.0-amd64" + image: "openhab/openhab:2.1.0-amd64" restart: always net: host cap_add: @@ -136,7 +137,7 @@ docker run \ -v /opt/openhab/addons:/openhab/addons \ -v /opt/openhab/conf:/openhab/conf \ -v /opt/openhab/userdata:/openhab/userdata \ - openhab/openhab:2.0.0-amd64 + openhab/openhab:2.1.0-amd64 ``` ### Accessing the console @@ -150,7 +151,7 @@ The default password for the login is ``habopen``. **Debug Mode** -You can run a new container with the command ``docker run -it openhab/openhab:2.0.0-amd64 ./start_debug.sh`` to get into the debug shell. +You can run a new container with the command ``docker run -it openhab/openhab:2.1.0-amd64 ./start_debug.sh`` to get into the debug shell. ## Environment variables @@ -189,4 +190,3 @@ $ docker run -it openhab/openhab server ## License When not explicitly set, files are placed under [![Eclipse license](https://img.shields.io/badge/license-Eclipse-blue.svg)](https://raw.githubusercontent.com/openhab/openhab-docker/master/LICENSE). - From 666d9c45529cac373a25f7de26a97c2741e49f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 20:07:07 +0200 Subject: [PATCH 03/11] Add Version 2.1.0 and 2.2.0-snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - From ed621b4411515e3ec8e8a4a1c625f48b21102e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 20:08:44 +0200 Subject: [PATCH 04/11] Add Version 2.1.0 and 2.2.0-snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- 1.8.3/amd64/entrypoint.sh | 3 +-- 1.8.3/arm64/entrypoint.sh | 3 +-- 1.8.3/armhf/entrypoint.sh | 3 +-- 2.0.0/amd64/entrypoint.sh | 3 +-- 2.0.0/arm64/entrypoint.sh | 3 +-- 2.0.0/armhf/entrypoint.sh | 3 +-- 2.1.0/amd64/entrypoint.sh | 3 +-- 2.1.0/arm64/entrypoint.sh | 3 +-- 2.1.0/armhf/entrypoint.sh | 3 +-- 2.2.0-snapshot/amd64/entrypoint.sh | 3 +-- 2.2.0-snapshot/arm64/entrypoint.sh | 3 +-- 2.2.0-snapshot/armhf/entrypoint.sh | 3 +-- 12 files changed, 12 insertions(+), 24 deletions(-) diff --git a/1.8.3/amd64/entrypoint.sh b/1.8.3/amd64/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/1.8.3/amd64/entrypoint.sh +++ b/1.8.3/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/1.8.3/arm64/entrypoint.sh b/1.8.3/arm64/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/1.8.3/arm64/entrypoint.sh +++ b/1.8.3/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/1.8.3/armhf/entrypoint.sh b/1.8.3/armhf/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/1.8.3/armhf/entrypoint.sh +++ b/1.8.3/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.0.0/amd64/entrypoint.sh b/2.0.0/amd64/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/2.0.0/amd64/entrypoint.sh +++ b/2.0.0/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.0.0/arm64/entrypoint.sh b/2.0.0/arm64/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/2.0.0/arm64/entrypoint.sh +++ b/2.0.0/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.0.0/armhf/entrypoint.sh b/2.0.0/armhf/entrypoint.sh index 0fa1a4dc..920523ce 100755 --- a/2.0.0/armhf/entrypoint.sh +++ b/2.0.0/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.1.0/amd64/entrypoint.sh b/2.1.0/amd64/entrypoint.sh index 0fa1a4dc..920523ce 100644 --- a/2.1.0/amd64/entrypoint.sh +++ b/2.1.0/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.1.0/arm64/entrypoint.sh b/2.1.0/arm64/entrypoint.sh index 0fa1a4dc..920523ce 100644 --- a/2.1.0/arm64/entrypoint.sh +++ b/2.1.0/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.1.0/armhf/entrypoint.sh b/2.1.0/armhf/entrypoint.sh index 0fa1a4dc..920523ce 100644 --- a/2.1.0/armhf/entrypoint.sh +++ b/2.1.0/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.2.0-snapshot/amd64/entrypoint.sh b/2.2.0-snapshot/amd64/entrypoint.sh index 0fa1a4dc..920523ce 100644 --- a/2.2.0-snapshot/amd64/entrypoint.sh +++ b/2.2.0-snapshot/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.2.0-snapshot/arm64/entrypoint.sh b/2.2.0-snapshot/arm64/entrypoint.sh index 0fa1a4dc..920523ce 100644 --- a/2.2.0-snapshot/arm64/entrypoint.sh +++ b/2.2.0-snapshot/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - diff --git a/2.2.0-snapshot/armhf/entrypoint.sh b/2.2.0-snapshot/armhf/entrypoint.sh index 0fa1a4dc..920523ce 100644 --- a/2.2.0-snapshot/armhf/entrypoint.sh +++ b/2.2.0-snapshot/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 @@ -56,4 +56,3 @@ esac chown -R openhab:openhab ${APPDIR} exec "$@" - From bddcc101b79069fc2348c2510196f02e8f5a9edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 21:11:37 +0200 Subject: [PATCH 05/11] Update entrypoint.sh (#94) (#1) Echo actual `NEW_USER_ID`, instead of hardcoded/default id=9001. --- 2.0.0/amd64/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.0.0/amd64/entrypoint.sh b/2.0.0/amd64/entrypoint.sh index 920523ce..408a29c7 100755 --- a/2.0.0/amd64/entrypoint.sh +++ b/2.0.0/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ From 31587c48749065b3a07a3ecaa6fdd9540ed89cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 21:29:58 +0200 Subject: [PATCH 06/11] Remove Version 2.2.0-snapshot and add 2.1.0-snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- .travis.yml | 7 +- 1.8.3/amd64/entrypoint.sh | 2 +- 1.8.3/arm64/entrypoint.sh | 2 +- 1.8.3/armhf/entrypoint.sh | 2 +- 2.0.0/amd64/entrypoint.sh | 4 +- 2.0.0/arm64/entrypoint.sh | 2 +- 2.0.0/armhf/entrypoint.sh | 2 +- 2.1.0-snapshot/amd64/Dockerfile | 95 +++++++++++++++++++++++++++ 2.1.0-snapshot/amd64/entrypoint.sh | 58 +++++++++++++++++ 2.1.0-snapshot/arm64/Dockerfile | 101 +++++++++++++++++++++++++++++ 2.1.0-snapshot/arm64/entrypoint.sh | 58 +++++++++++++++++ 2.1.0-snapshot/armhf/Dockerfile | 95 +++++++++++++++++++++++++++ 2.1.0-snapshot/armhf/entrypoint.sh | 58 +++++++++++++++++ 2.1.0/amd64/entrypoint.sh | 2 +- 2.1.0/arm64/entrypoint.sh | 2 +- 2.1.0/armhf/entrypoint.sh | 2 +- README.md | 2 +- entrypoint.sh | 2 +- update.sh | 9 ++- 19 files changed, 484 insertions(+), 21 deletions(-) create mode 100644 2.1.0-snapshot/amd64/Dockerfile create mode 100644 2.1.0-snapshot/amd64/entrypoint.sh create mode 100644 2.1.0-snapshot/arm64/Dockerfile create mode 100644 2.1.0-snapshot/arm64/entrypoint.sh create mode 100644 2.1.0-snapshot/armhf/Dockerfile create mode 100644 2.1.0-snapshot/armhf/entrypoint.sh diff --git a/.travis.yml b/.travis.yml index 67294cb7..be829cc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,9 +31,8 @@ env: - TARGET=amd64 VERSION=2.1.0 - TARGET=armhf VERSION=2.1.0 - TARGET=arm64 VERSION=2.1.0 - - TARGET=amd64 VERSION=2.2.0-snapshot - - TARGET=armhf VERSION=2.2.0-snapshot - - TARGET=arm64 VERSION=2.2.0-snapshot + - TARGET=amd64 VERSION=2.1.0-snapshot + - TARGET=armhf VERSION=2.1.0-snapshot + - TARGET=arm64 VERSION=2.1.0-snapshot matrix: fast_finish: true - diff --git a/1.8.3/amd64/entrypoint.sh b/1.8.3/amd64/entrypoint.sh index 920523ce..9999c9ed 100755 --- a/1.8.3/amd64/entrypoint.sh +++ b/1.8.3/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/1.8.3/arm64/entrypoint.sh b/1.8.3/arm64/entrypoint.sh index 920523ce..9999c9ed 100755 --- a/1.8.3/arm64/entrypoint.sh +++ b/1.8.3/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/1.8.3/armhf/entrypoint.sh b/1.8.3/armhf/entrypoint.sh index 920523ce..9999c9ed 100755 --- a/1.8.3/armhf/entrypoint.sh +++ b/1.8.3/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.0.0/amd64/entrypoint.sh b/2.0.0/amd64/entrypoint.sh index 408a29c7..9999c9ed 100755 --- a/2.0.0/amd64/entrypoint.sh +++ b/2.0.0/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id ${NEW_USER_ID}" + echo "Create user openhab with id 9001" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.0.0/arm64/entrypoint.sh b/2.0.0/arm64/entrypoint.sh index 920523ce..9999c9ed 100755 --- a/2.0.0/arm64/entrypoint.sh +++ b/2.0.0/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.0.0/armhf/entrypoint.sh b/2.0.0/armhf/entrypoint.sh index 920523ce..9999c9ed 100755 --- a/2.0.0/armhf/entrypoint.sh +++ b/2.0.0/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.1.0-snapshot/amd64/Dockerfile b/2.1.0-snapshot/amd64/Dockerfile new file mode 100644 index 00000000..525f7643 --- /dev/null +++ b/2.1.0-snapshot/amd64/Dockerfile @@ -0,0 +1,95 @@ +# openhab image +# +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# + +FROM multiarch/debian-debootstrap:amd64-jessie + +# Set download urls +ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" +ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" +ENV OPENHAB_VERSION="2.1.0-snapshot" + +# Set variables +ENV \ + APPDIR="/openhab" \ + DEBIAN_FRONTEND=noninteractive \ + EXTRA_JAVA_OPTS="" \ + JAVA_HOME='/usr/lib/java-8' \ + OPENHAB_HTTP_PORT="8080" \ + OPENHAB_HTTPS_PORT="8443" + +# Basic build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG VCS_REF +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.docker.dockerfile="/Dockerfile" \ + org.label-schema.license="EPL" \ + org.label-schema.name="openHAB" \ + org.label-schema.url="http://www.openhab.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git" + +# Install basepackages +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + fontconfig \ + locales \ + locales-all \ + libpcap-dev \ + netbase \ + unzip \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Set locales +ENV \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + +# Install java +RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\ + mkdir ${JAVA_HOME} && \ + tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME} && \ + update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 50 && \ + update-alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac 50 + +# Install gosu +ENV GOSU_VERSION 1.10 +RUN set -x \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +# Install openhab +# Set permissions for openhab. Export TERM variable. See issue #30 for details! +RUN wget -nv -O /tmp/openhab.zip ${OPENHAB_URL} &&\ + unzip -q /tmp/openhab.zip -d ${APPDIR} &&\ + rm /tmp/openhab.zip &&\ + mkdir -p ${APPDIR}/userdata/logs &&\ + touch ${APPDIR}/userdata/logs/openhab.log && \ + cp -a ${APPDIR}/userdata ${APPDIR}/userdata.dist && \ + cp -a ${APPDIR}/conf ${APPDIR}/conf.dist && \ + echo "export TERM=dumb" | tee -a ~/.bashrc + +# Expose volume with configuration and userdata dir +VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons + +# Execute command +WORKDIR ${APPDIR} +EXPOSE 8080 8443 5555 +COPY entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] +CMD ["gosu", "openhab", "./start.sh"] + diff --git a/2.1.0-snapshot/amd64/entrypoint.sh b/2.1.0-snapshot/amd64/entrypoint.sh new file mode 100644 index 00000000..9999c9ed --- /dev/null +++ b/2.1.0-snapshot/amd64/entrypoint.sh @@ -0,0 +1,58 @@ +#!/bin/bash -x +set -euo pipefail +IFS=$'\n\t' + +# Add openhab user & handle possible device groups for different host systems +# Container base image puts dialout on group id 20, uucp on id 10 +# GPIO Group for RPI access +NEW_USER_ID=${USER_ID:-9001} +echo "Starting with openhab user id: $NEW_USER_ID" +if ! id -u openhab >/dev/null 2>&1; then + echo "Create user openhab with id 9001" + adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ + groupadd -g 14 uucp2 &&\ + groupadd -g 16 dialout2 &&\ + groupadd -g 18 dialout3 &&\ + groupadd -g 32 uucp3 &&\ + groupadd -g 997 gpio &&\ + adduser openhab dialout &&\ + adduser openhab uucp &&\ + adduser openhab uucp2 &&\ + adduser openhab dialout2 &&\ + adduser openhab dialout3 &&\ + adduser openhab uucp3 &&\ + adduser openhab gpio +fi + +# Copy initial files to host volume +case ${OPENHAB_VERSION} in + 1.8.3) + if [ -z "$(ls -A "${APPDIR}/configurations")" ]; then + # Copy userdata dir for version 1.8.3 + echo "No configuration found... initializing." + cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" + fi + ;; + 2.0.0|2.1.0|2.1.0-snapshot) + # Initialize empty host volumes + if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No userdata found... initializing." + cp -av "${APPDIR}/userdata.dist/." "${APPDIR}/userdata/" + fi + + if [ -z "$(ls -A "${APPDIR}/conf")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No configuration found... initializing." + cp -av "${APPDIR}/conf.dist/." "${APPDIR}/conf/" + fi + ;; + *) + echo openHAB version ${OPENHAB_VERSION} not supported! + ;; +esac + +# Set openhab folder permission +chown -R openhab:openhab ${APPDIR} + +exec "$@" diff --git a/2.1.0-snapshot/arm64/Dockerfile b/2.1.0-snapshot/arm64/Dockerfile new file mode 100644 index 00000000..9a815c6d --- /dev/null +++ b/2.1.0-snapshot/arm64/Dockerfile @@ -0,0 +1,101 @@ +# openhab image +# +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# + +FROM multiarch/debian-debootstrap:arm64-jessie + +# Set download urls +ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" +ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" +ENV OPENHAB_VERSION="2.1.0-snapshot" + +# Set variables +ENV \ + APPDIR="/openhab" \ + DEBIAN_FRONTEND=noninteractive \ + EXTRA_JAVA_OPTS="" \ + JAVA_HOME='/usr/lib/java-8' \ + OPENHAB_HTTP_PORT="8080" \ + OPENHAB_HTTPS_PORT="8443" + +# Basic build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG VCS_REF +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.docker.dockerfile="/Dockerfile" \ + org.label-schema.license="EPL" \ + org.label-schema.name="openHAB" \ + org.label-schema.url="http://www.openhab.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git" + +# Install basepackages +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + fontconfig \ + locales \ + locales-all \ + libpcap-dev \ + netbase \ + unzip \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Set locales +ENV \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + +RUN dpkg --add-architecture armhf && \ + apt-get update && \ + apt-get install --no-install-recommends -y \ + libc6:armhf \ + && rm -rf /var/lib/apt/lists/* + +# Install java +RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\ + mkdir ${JAVA_HOME} && \ + tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME} && \ + update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 50 && \ + update-alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac 50 + +# Install gosu +ENV GOSU_VERSION 1.10 +RUN set -x \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +# Install openhab +# Set permissions for openhab. Export TERM variable. See issue #30 for details! +RUN wget -nv -O /tmp/openhab.zip ${OPENHAB_URL} &&\ + unzip -q /tmp/openhab.zip -d ${APPDIR} &&\ + rm /tmp/openhab.zip &&\ + mkdir -p ${APPDIR}/userdata/logs &&\ + touch ${APPDIR}/userdata/logs/openhab.log && \ + cp -a ${APPDIR}/userdata ${APPDIR}/userdata.dist && \ + cp -a ${APPDIR}/conf ${APPDIR}/conf.dist && \ + echo "export TERM=dumb" | tee -a ~/.bashrc + +# Expose volume with configuration and userdata dir +VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons + +# Execute command +WORKDIR ${APPDIR} +EXPOSE 8080 8443 5555 +COPY entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] +CMD ["gosu", "openhab", "./start.sh"] + diff --git a/2.1.0-snapshot/arm64/entrypoint.sh b/2.1.0-snapshot/arm64/entrypoint.sh new file mode 100644 index 00000000..9999c9ed --- /dev/null +++ b/2.1.0-snapshot/arm64/entrypoint.sh @@ -0,0 +1,58 @@ +#!/bin/bash -x +set -euo pipefail +IFS=$'\n\t' + +# Add openhab user & handle possible device groups for different host systems +# Container base image puts dialout on group id 20, uucp on id 10 +# GPIO Group for RPI access +NEW_USER_ID=${USER_ID:-9001} +echo "Starting with openhab user id: $NEW_USER_ID" +if ! id -u openhab >/dev/null 2>&1; then + echo "Create user openhab with id 9001" + adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ + groupadd -g 14 uucp2 &&\ + groupadd -g 16 dialout2 &&\ + groupadd -g 18 dialout3 &&\ + groupadd -g 32 uucp3 &&\ + groupadd -g 997 gpio &&\ + adduser openhab dialout &&\ + adduser openhab uucp &&\ + adduser openhab uucp2 &&\ + adduser openhab dialout2 &&\ + adduser openhab dialout3 &&\ + adduser openhab uucp3 &&\ + adduser openhab gpio +fi + +# Copy initial files to host volume +case ${OPENHAB_VERSION} in + 1.8.3) + if [ -z "$(ls -A "${APPDIR}/configurations")" ]; then + # Copy userdata dir for version 1.8.3 + echo "No configuration found... initializing." + cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" + fi + ;; + 2.0.0|2.1.0|2.1.0-snapshot) + # Initialize empty host volumes + if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No userdata found... initializing." + cp -av "${APPDIR}/userdata.dist/." "${APPDIR}/userdata/" + fi + + if [ -z "$(ls -A "${APPDIR}/conf")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No configuration found... initializing." + cp -av "${APPDIR}/conf.dist/." "${APPDIR}/conf/" + fi + ;; + *) + echo openHAB version ${OPENHAB_VERSION} not supported! + ;; +esac + +# Set openhab folder permission +chown -R openhab:openhab ${APPDIR} + +exec "$@" diff --git a/2.1.0-snapshot/armhf/Dockerfile b/2.1.0-snapshot/armhf/Dockerfile new file mode 100644 index 00000000..ffe78679 --- /dev/null +++ b/2.1.0-snapshot/armhf/Dockerfile @@ -0,0 +1,95 @@ +# openhab image +# +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# + +FROM multiarch/debian-debootstrap:armhf-jessie + +# Set download urls +ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" +ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" +ENV OPENHAB_VERSION="2.1.0-snapshot" + +# Set variables +ENV \ + APPDIR="/openhab" \ + DEBIAN_FRONTEND=noninteractive \ + EXTRA_JAVA_OPTS="" \ + JAVA_HOME='/usr/lib/java-8' \ + OPENHAB_HTTP_PORT="8080" \ + OPENHAB_HTTPS_PORT="8443" + +# Basic build-time metadata as defined at http://label-schema.org +ARG BUILD_DATE +ARG VCS_REF +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.docker.dockerfile="/Dockerfile" \ + org.label-schema.license="EPL" \ + org.label-schema.name="openHAB" \ + org.label-schema.url="http://www.openhab.com/" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-type="Git" \ + org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git" + +# Install basepackages +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + ca-certificates \ + fontconfig \ + locales \ + locales-all \ + libpcap-dev \ + netbase \ + unzip \ + wget \ + && rm -rf /var/lib/apt/lists/* + +# Set locales +ENV \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LANGUAGE=en_US.UTF-8 + +# Install java +RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\ + mkdir ${JAVA_HOME} && \ + tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME} && \ + update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 50 && \ + update-alternatives --install /usr/bin/javac javac ${JAVA_HOME}/bin/javac 50 + +# Install gosu +ENV GOSU_VERSION 1.10 +RUN set -x \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +# Install openhab +# Set permissions for openhab. Export TERM variable. See issue #30 for details! +RUN wget -nv -O /tmp/openhab.zip ${OPENHAB_URL} &&\ + unzip -q /tmp/openhab.zip -d ${APPDIR} &&\ + rm /tmp/openhab.zip &&\ + mkdir -p ${APPDIR}/userdata/logs &&\ + touch ${APPDIR}/userdata/logs/openhab.log && \ + cp -a ${APPDIR}/userdata ${APPDIR}/userdata.dist && \ + cp -a ${APPDIR}/conf ${APPDIR}/conf.dist && \ + echo "export TERM=dumb" | tee -a ~/.bashrc + +# Expose volume with configuration and userdata dir +VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons + +# Execute command +WORKDIR ${APPDIR} +EXPOSE 8080 8443 5555 +COPY entrypoint.sh / +ENTRYPOINT ["/entrypoint.sh"] +CMD ["gosu", "openhab", "./start.sh"] + diff --git a/2.1.0-snapshot/armhf/entrypoint.sh b/2.1.0-snapshot/armhf/entrypoint.sh new file mode 100644 index 00000000..9999c9ed --- /dev/null +++ b/2.1.0-snapshot/armhf/entrypoint.sh @@ -0,0 +1,58 @@ +#!/bin/bash -x +set -euo pipefail +IFS=$'\n\t' + +# Add openhab user & handle possible device groups for different host systems +# Container base image puts dialout on group id 20, uucp on id 10 +# GPIO Group for RPI access +NEW_USER_ID=${USER_ID:-9001} +echo "Starting with openhab user id: $NEW_USER_ID" +if ! id -u openhab >/dev/null 2>&1; then + echo "Create user openhab with id 9001" + adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ + groupadd -g 14 uucp2 &&\ + groupadd -g 16 dialout2 &&\ + groupadd -g 18 dialout3 &&\ + groupadd -g 32 uucp3 &&\ + groupadd -g 997 gpio &&\ + adduser openhab dialout &&\ + adduser openhab uucp &&\ + adduser openhab uucp2 &&\ + adduser openhab dialout2 &&\ + adduser openhab dialout3 &&\ + adduser openhab uucp3 &&\ + adduser openhab gpio +fi + +# Copy initial files to host volume +case ${OPENHAB_VERSION} in + 1.8.3) + if [ -z "$(ls -A "${APPDIR}/configurations")" ]; then + # Copy userdata dir for version 1.8.3 + echo "No configuration found... initializing." + cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" + fi + ;; + 2.0.0|2.1.0|2.1.0-snapshot) + # Initialize empty host volumes + if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No userdata found... initializing." + cp -av "${APPDIR}/userdata.dist/." "${APPDIR}/userdata/" + fi + + if [ -z "$(ls -A "${APPDIR}/conf")" ]; then + # Copy userdata dir for version 2.0.0 + echo "No configuration found... initializing." + cp -av "${APPDIR}/conf.dist/." "${APPDIR}/conf/" + fi + ;; + *) + echo openHAB version ${OPENHAB_VERSION} not supported! + ;; +esac + +# Set openhab folder permission +chown -R openhab:openhab ${APPDIR} + +exec "$@" diff --git a/2.1.0/amd64/entrypoint.sh b/2.1.0/amd64/entrypoint.sh index 920523ce..9999c9ed 100644 --- a/2.1.0/amd64/entrypoint.sh +++ b/2.1.0/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.1.0/arm64/entrypoint.sh b/2.1.0/arm64/entrypoint.sh index 920523ce..9999c9ed 100644 --- a/2.1.0/arm64/entrypoint.sh +++ b/2.1.0/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.1.0/armhf/entrypoint.sh b/2.1.0/armhf/entrypoint.sh index 920523ce..9999c9ed 100644 --- a/2.1.0/armhf/entrypoint.sh +++ b/2.1.0/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/README.md b/README.md index 51d69b5d..41564c07 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Repository for building Docker containers for [openHAB](http://openhab.org) (Hom * [``1.8.3`` Stable openHAB 1.8 version](https://github.com/openhab/openhab-docker/blob/master/1.8.3/amd64/Dockerfile) * [``2.0.0`` Stable openHAB 2.0 version](https://github.com/openhab/openhab-docker/blob/master/2.0.0/amd64/Dockerfile) * [``2.1.0`` Stable openHAB 2.1 version](https://github.com/openhab/openhab-docker/blob/master/2.1.0/amd64/Dockerfile) -* [``2.2.0-snapshot`` Experimental openHAB 2.2 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.2.0-snapshot/amd64/Dockerfile) +* [``2.1.0-snapshot`` Experimental openHAB 2.1 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.1.0-snapshot/amd64/Dockerfile) **Architecture:** diff --git a/entrypoint.sh b/entrypoint.sh index 920523ce..9999c9ed 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.2.0-snapshot) + 2.0.0|2.1.0|2.1.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/update.sh b/update.sh index 302c1b79..d1c46180 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,7 @@ set -eo pipefail # Dockerfiles to be generated -versions="2.2.0-snapshot 2.1.0 2.0.0 1.8.3" +versions="2.1.0-snapshot 2.1.0 2.0.0 1.8.3" arches="amd64 armhf arm64" # Generate header @@ -24,8 +24,8 @@ print_header() { print_baseimage() { # Set download url for openhab version case $version in - 2.2.0-snapshot) - openhab_url="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" + 2.1.0-snapshot) + openhab_url="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" ;; 2.1.0) openhab_url="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" @@ -55,7 +55,7 @@ print_baseimage() { esac cat >> $1 <<-EOI FROM multiarch/debian-debootstrap:$arch-jessie - + # Set download urls ENV JAVA_URL="$java_url" ENV OPENHAB_URL="$openhab_url" @@ -242,4 +242,3 @@ do echo "done" done done - From ffe55d027bb19f2e80ee272a05b4bc459885e643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 22:27:40 +0200 Subject: [PATCH 07/11] Echo actual `NEW_USER_ID`, instead of hardcoded/default id=9001. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- 1.8.3/amd64/entrypoint.sh | 2 +- 1.8.3/arm64/entrypoint.sh | 2 +- 1.8.3/armhf/entrypoint.sh | 2 +- 2.0.0/amd64/entrypoint.sh | 2 +- 2.0.0/arm64/entrypoint.sh | 2 +- 2.0.0/armhf/entrypoint.sh | 2 +- 2.1.0-snapshot/amd64/entrypoint.sh | 2 +- 2.1.0-snapshot/arm64/entrypoint.sh | 2 +- 2.1.0-snapshot/armhf/entrypoint.sh | 2 +- 2.1.0/amd64/entrypoint.sh | 2 +- 2.1.0/arm64/entrypoint.sh | 2 +- 2.1.0/armhf/entrypoint.sh | 2 +- entrypoint.sh | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/1.8.3/amd64/entrypoint.sh b/1.8.3/amd64/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/1.8.3/amd64/entrypoint.sh +++ b/1.8.3/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/1.8.3/arm64/entrypoint.sh b/1.8.3/arm64/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/1.8.3/arm64/entrypoint.sh +++ b/1.8.3/arm64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/1.8.3/armhf/entrypoint.sh b/1.8.3/armhf/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/1.8.3/armhf/entrypoint.sh +++ b/1.8.3/armhf/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.0.0/amd64/entrypoint.sh b/2.0.0/amd64/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/2.0.0/amd64/entrypoint.sh +++ b/2.0.0/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.0.0/arm64/entrypoint.sh b/2.0.0/arm64/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/2.0.0/arm64/entrypoint.sh +++ b/2.0.0/arm64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.0.0/armhf/entrypoint.sh b/2.0.0/armhf/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/2.0.0/armhf/entrypoint.sh +++ b/2.0.0/armhf/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.1.0-snapshot/amd64/entrypoint.sh b/2.1.0-snapshot/amd64/entrypoint.sh index 9999c9ed..5545ae73 100644 --- a/2.1.0-snapshot/amd64/entrypoint.sh +++ b/2.1.0-snapshot/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.1.0-snapshot/arm64/entrypoint.sh b/2.1.0-snapshot/arm64/entrypoint.sh index 9999c9ed..5545ae73 100644 --- a/2.1.0-snapshot/arm64/entrypoint.sh +++ b/2.1.0-snapshot/arm64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.1.0-snapshot/armhf/entrypoint.sh b/2.1.0-snapshot/armhf/entrypoint.sh index 9999c9ed..5545ae73 100644 --- a/2.1.0-snapshot/armhf/entrypoint.sh +++ b/2.1.0-snapshot/armhf/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.1.0/amd64/entrypoint.sh b/2.1.0/amd64/entrypoint.sh index 9999c9ed..5545ae73 100644 --- a/2.1.0/amd64/entrypoint.sh +++ b/2.1.0/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.1.0/arm64/entrypoint.sh b/2.1.0/arm64/entrypoint.sh index 9999c9ed..5545ae73 100644 --- a/2.1.0/arm64/entrypoint.sh +++ b/2.1.0/arm64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.1.0/armhf/entrypoint.sh b/2.1.0/armhf/entrypoint.sh index 9999c9ed..5545ae73 100644 --- a/2.1.0/armhf/entrypoint.sh +++ b/2.1.0/armhf/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/entrypoint.sh b/entrypoint.sh index 9999c9ed..5545ae73 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ From 78c5537d089872a211e3dcf940a9bcd517fd26a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 22:38:46 +0200 Subject: [PATCH 08/11] Fix sudo enabled environment for travis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index be829cc0..a26fe51b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ sudo: required +group: deprecated-2017Q2 language: bash branches: only: From c334994807ed1473ef8aca43fa52345224c9d977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Wed, 28 Jun 2017 22:56:58 +0200 Subject: [PATCH 09/11] RUN chmod +x on entrypoint.sh within Dockerfile to fix permission issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- 1.8.3/amd64/Dockerfile | 1 + 1.8.3/arm64/Dockerfile | 1 + 1.8.3/armhf/Dockerfile | 1 + 2.0.0/amd64/Dockerfile | 1 + 2.0.0/arm64/Dockerfile | 1 + 2.0.0/armhf/Dockerfile | 1 + 2.1.0-snapshot/amd64/Dockerfile | 1 + 2.1.0-snapshot/arm64/Dockerfile | 1 + 2.1.0-snapshot/armhf/Dockerfile | 1 + 2.1.0/amd64/Dockerfile | 1 + 2.1.0/arm64/Dockerfile | 1 + 2.1.0/armhf/Dockerfile | 1 + update.sh | 1 + 13 files changed, 13 insertions(+) diff --git a/1.8.3/amd64/Dockerfile b/1.8.3/amd64/Dockerfile index 4de95c80..b42c569b 100644 --- a/1.8.3/amd64/Dockerfile +++ b/1.8.3/amd64/Dockerfile @@ -87,6 +87,7 @@ VOLUME ${APPDIR}/configurations ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/1.8.3/arm64/Dockerfile b/1.8.3/arm64/Dockerfile index 8bbb9bb2..5deac90a 100644 --- a/1.8.3/arm64/Dockerfile +++ b/1.8.3/arm64/Dockerfile @@ -93,6 +93,7 @@ VOLUME ${APPDIR}/configurations ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/1.8.3/armhf/Dockerfile b/1.8.3/armhf/Dockerfile index 14041fa8..631de6f5 100644 --- a/1.8.3/armhf/Dockerfile +++ b/1.8.3/armhf/Dockerfile @@ -87,6 +87,7 @@ VOLUME ${APPDIR}/configurations ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.0.0/amd64/Dockerfile b/2.0.0/amd64/Dockerfile index f4cb5267..7712ba4a 100644 --- a/2.0.0/amd64/Dockerfile +++ b/2.0.0/amd64/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.0.0/arm64/Dockerfile b/2.0.0/arm64/Dockerfile index d6c831f6..4f2c658c 100644 --- a/2.0.0/arm64/Dockerfile +++ b/2.0.0/arm64/Dockerfile @@ -96,6 +96,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.0.0/armhf/Dockerfile b/2.0.0/armhf/Dockerfile index 841f11c5..15c4eea7 100644 --- a/2.0.0/armhf/Dockerfile +++ b/2.0.0/armhf/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.1.0-snapshot/amd64/Dockerfile b/2.1.0-snapshot/amd64/Dockerfile index 525f7643..c7145dd9 100644 --- a/2.1.0-snapshot/amd64/Dockerfile +++ b/2.1.0-snapshot/amd64/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.1.0-snapshot/arm64/Dockerfile b/2.1.0-snapshot/arm64/Dockerfile index 9a815c6d..febbf168 100644 --- a/2.1.0-snapshot/arm64/Dockerfile +++ b/2.1.0-snapshot/arm64/Dockerfile @@ -96,6 +96,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.1.0-snapshot/armhf/Dockerfile b/2.1.0-snapshot/armhf/Dockerfile index ffe78679..9d67099d 100644 --- a/2.1.0-snapshot/armhf/Dockerfile +++ b/2.1.0-snapshot/armhf/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.1.0/amd64/Dockerfile b/2.1.0/amd64/Dockerfile index 1d8c247a..06045881 100644 --- a/2.1.0/amd64/Dockerfile +++ b/2.1.0/amd64/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.1.0/arm64/Dockerfile b/2.1.0/arm64/Dockerfile index d590d1a4..2c9f4ce5 100644 --- a/2.1.0/arm64/Dockerfile +++ b/2.1.0/arm64/Dockerfile @@ -96,6 +96,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.1.0/armhf/Dockerfile b/2.1.0/armhf/Dockerfile index 8c51f23f..4dc3acc2 100644 --- a/2.1.0/armhf/Dockerfile +++ b/2.1.0/armhf/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/update.sh b/update.sh index d1c46180..96a60950 100755 --- a/update.sh +++ b/update.sh @@ -208,6 +208,7 @@ print_command() { WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / + RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] From c25de88dedd0c15671fd503730beeab373611dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Thu, 29 Jun 2017 21:53:36 +0200 Subject: [PATCH 10/11] Add version 2.2.0-snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- .travis.yml | 6 +++--- 1.8.3/amd64/entrypoint.sh | 2 +- 1.8.3/arm64/entrypoint.sh | 2 +- 1.8.3/armhf/entrypoint.sh | 2 +- 2.0.0/amd64/entrypoint.sh | 2 +- 2.0.0/arm64/entrypoint.sh | 2 +- 2.0.0/armhf/entrypoint.sh | 2 +- 2.1.0/amd64/entrypoint.sh | 2 +- 2.1.0/arm64/entrypoint.sh | 2 +- 2.1.0/armhf/entrypoint.sh | 2 +- 2.2.0-snapshot/amd64/Dockerfile | 1 + 2.2.0-snapshot/amd64/entrypoint.sh | 2 +- 2.2.0-snapshot/arm64/Dockerfile | 1 + 2.2.0-snapshot/arm64/entrypoint.sh | 2 +- 2.2.0-snapshot/armhf/Dockerfile | 1 + 2.2.0-snapshot/armhf/entrypoint.sh | 2 +- README.md | 2 +- entrypoint.sh | 2 +- update.sh | 6 +++--- 19 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index a26fe51b..161691ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,8 @@ env: - TARGET=amd64 VERSION=2.1.0 - TARGET=armhf VERSION=2.1.0 - TARGET=arm64 VERSION=2.1.0 - - TARGET=amd64 VERSION=2.1.0-snapshot - - TARGET=armhf VERSION=2.1.0-snapshot - - TARGET=arm64 VERSION=2.1.0-snapshot + - TARGET=amd64 VERSION=2.2.0-snapshot + - TARGET=armhf VERSION=2.2.0-snapshot + - TARGET=arm64 VERSION=2.2.0-snapshot matrix: fast_finish: true diff --git a/1.8.3/amd64/entrypoint.sh b/1.8.3/amd64/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/1.8.3/amd64/entrypoint.sh +++ b/1.8.3/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/1.8.3/arm64/entrypoint.sh b/1.8.3/arm64/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/1.8.3/arm64/entrypoint.sh +++ b/1.8.3/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/1.8.3/armhf/entrypoint.sh b/1.8.3/armhf/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/1.8.3/armhf/entrypoint.sh +++ b/1.8.3/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.0.0/amd64/entrypoint.sh b/2.0.0/amd64/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/2.0.0/amd64/entrypoint.sh +++ b/2.0.0/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.0.0/arm64/entrypoint.sh b/2.0.0/arm64/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/2.0.0/arm64/entrypoint.sh +++ b/2.0.0/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.0.0/armhf/entrypoint.sh b/2.0.0/armhf/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/2.0.0/armhf/entrypoint.sh +++ b/2.0.0/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.1.0/amd64/entrypoint.sh b/2.1.0/amd64/entrypoint.sh index 5545ae73..408a29c7 100644 --- a/2.1.0/amd64/entrypoint.sh +++ b/2.1.0/amd64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.1.0/arm64/entrypoint.sh b/2.1.0/arm64/entrypoint.sh index 5545ae73..408a29c7 100644 --- a/2.1.0/arm64/entrypoint.sh +++ b/2.1.0/arm64/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.1.0/armhf/entrypoint.sh b/2.1.0/armhf/entrypoint.sh index 5545ae73..408a29c7 100644 --- a/2.1.0/armhf/entrypoint.sh +++ b/2.1.0/armhf/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/2.2.0-snapshot/amd64/Dockerfile b/2.2.0-snapshot/amd64/Dockerfile index 7f04dfbb..e6c8f8cd 100644 --- a/2.2.0-snapshot/amd64/Dockerfile +++ b/2.2.0-snapshot/amd64/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.2.0-snapshot/amd64/entrypoint.sh b/2.2.0-snapshot/amd64/entrypoint.sh index 920523ce..408a29c7 100644 --- a/2.2.0-snapshot/amd64/entrypoint.sh +++ b/2.2.0-snapshot/amd64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.2.0-snapshot/arm64/Dockerfile b/2.2.0-snapshot/arm64/Dockerfile index 627406f6..db660e81 100644 --- a/2.2.0-snapshot/arm64/Dockerfile +++ b/2.2.0-snapshot/arm64/Dockerfile @@ -96,6 +96,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.2.0-snapshot/arm64/entrypoint.sh b/2.2.0-snapshot/arm64/entrypoint.sh index 920523ce..408a29c7 100644 --- a/2.2.0-snapshot/arm64/entrypoint.sh +++ b/2.2.0-snapshot/arm64/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/2.2.0-snapshot/armhf/Dockerfile b/2.2.0-snapshot/armhf/Dockerfile index 1f7dc4e2..0f24673c 100644 --- a/2.2.0-snapshot/armhf/Dockerfile +++ b/2.2.0-snapshot/armhf/Dockerfile @@ -90,6 +90,7 @@ VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons WORKDIR ${APPDIR} EXPOSE 8080 8443 5555 COPY entrypoint.sh / +RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["gosu", "openhab", "./start.sh"] diff --git a/2.2.0-snapshot/armhf/entrypoint.sh b/2.2.0-snapshot/armhf/entrypoint.sh index 920523ce..408a29c7 100644 --- a/2.2.0-snapshot/armhf/entrypoint.sh +++ b/2.2.0-snapshot/armhf/entrypoint.sh @@ -8,7 +8,7 @@ IFS=$'\n\t' NEW_USER_ID=${USER_ID:-9001} echo "Starting with openhab user id: $NEW_USER_ID" if ! id -u openhab >/dev/null 2>&1; then - echo "Create user openhab with id 9001" + echo "Create user openhab with id ${NEW_USER_ID}" adduser -u $NEW_USER_ID --disabled-password --gecos '' --home ${APPDIR} openhab &&\ groupadd -g 14 uucp2 &&\ groupadd -g 16 dialout2 &&\ diff --git a/README.md b/README.md index 41564c07..8e01d21d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Repository for building Docker containers for [openHAB](http://openhab.org) (Hom * [``1.8.3`` Stable openHAB 1.8 version](https://github.com/openhab/openhab-docker/blob/master/1.8.3/amd64/Dockerfile) * [``2.0.0`` Stable openHAB 2.0 version](https://github.com/openhab/openhab-docker/blob/master/2.0.0/amd64/Dockerfile) * [``2.1.0`` Stable openHAB 2.1 version](https://github.com/openhab/openhab-docker/blob/master/2.1.0/amd64/Dockerfile) -* [``2.1.0-snapshot`` Experimental openHAB 2.1 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.1.0-snapshot/amd64/Dockerfile) +* [``2.2.0-snapshot`` Experimental openHAB 2.1 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.2.0-snapshot/amd64/Dockerfile) **Architecture:** diff --git a/entrypoint.sh b/entrypoint.sh index 5545ae73..408a29c7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -33,7 +33,7 @@ case ${OPENHAB_VERSION} in cp -av "${APPDIR}/configurations.dist/." "${APPDIR}/configurations/" fi ;; - 2.0.0|2.1.0|2.1.0-snapshot) + 2.0.0|2.1.0|2.2.0-snapshot) # Initialize empty host volumes if [ -z "$(ls -A "${APPDIR}/userdata")" ]; then # Copy userdata dir for version 2.0.0 diff --git a/update.sh b/update.sh index 96a60950..a11d97ce 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,7 @@ set -eo pipefail # Dockerfiles to be generated -versions="2.1.0-snapshot 2.1.0 2.0.0 1.8.3" +versions="2.2.0-snapshot 2.1.0 2.0.0 1.8.3" arches="amd64 armhf arm64" # Generate header @@ -24,8 +24,8 @@ print_header() { print_baseimage() { # Set download url for openhab version case $version in - 2.1.0-snapshot) - openhab_url="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip" + 2.2.0-snapshot) + openhab_url="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" ;; 2.1.0) openhab_url="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" From 03ab20cc154e6121231cecac35f2070031c7fd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=A4ussler?= Date: Thu, 29 Jun 2017 22:57:47 +0200 Subject: [PATCH 11/11] Add MAINTAINER section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Häussler (github: @cniweb) --- 1.8.3/amd64/Dockerfile | 2 ++ 1.8.3/arm64/Dockerfile | 2 ++ 1.8.3/armhf/Dockerfile | 2 ++ 2.0.0/amd64/Dockerfile | 2 ++ 2.0.0/arm64/Dockerfile | 2 ++ 2.0.0/armhf/Dockerfile | 2 ++ 2.1.0/amd64/Dockerfile | 2 ++ 2.1.0/arm64/Dockerfile | 2 ++ 2.1.0/armhf/Dockerfile | 2 ++ 2.2.0-snapshot/amd64/Dockerfile | 2 ++ 2.2.0-snapshot/arm64/Dockerfile | 2 ++ 2.2.0-snapshot/armhf/Dockerfile | 2 ++ README.md | 2 +- update.sh | 2 ++ 14 files changed, 27 insertions(+), 1 deletion(-) diff --git a/1.8.3/amd64/Dockerfile b/1.8.3/amd64/Dockerfile index b42c569b..40ea00de 100644 --- a/1.8.3/amd64/Dockerfile +++ b/1.8.3/amd64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:amd64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" ENV OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" diff --git a/1.8.3/arm64/Dockerfile b/1.8.3/arm64/Dockerfile index 5deac90a..d27f4975 100644 --- a/1.8.3/arm64/Dockerfile +++ b/1.8.3/arm64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:arm64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" diff --git a/1.8.3/armhf/Dockerfile b/1.8.3/armhf/Dockerfile index 631de6f5..be92b2f2 100644 --- a/1.8.3/armhf/Dockerfile +++ b/1.8.3/armhf/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:armhf-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://bintray.com/artifact/download/openhab/bin/distribution-1.8.3-runtime.zip" diff --git a/2.0.0/amd64/Dockerfile b/2.0.0/amd64/Dockerfile index 7712ba4a..817a211b 100644 --- a/2.0.0/amd64/Dockerfile +++ b/2.0.0/amd64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:amd64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" diff --git a/2.0.0/arm64/Dockerfile b/2.0.0/arm64/Dockerfile index 4f2c658c..a8214524 100644 --- a/2.0.0/arm64/Dockerfile +++ b/2.0.0/arm64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:arm64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" diff --git a/2.0.0/armhf/Dockerfile b/2.0.0/armhf/Dockerfile index 15c4eea7..a29a7fc1 100644 --- a/2.0.0/armhf/Dockerfile +++ b/2.0.0/armhf/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:armhf-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip" diff --git a/2.1.0/amd64/Dockerfile b/2.1.0/amd64/Dockerfile index 06045881..bc1a01e5 100644 --- a/2.1.0/amd64/Dockerfile +++ b/2.1.0/amd64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:amd64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" diff --git a/2.1.0/arm64/Dockerfile b/2.1.0/arm64/Dockerfile index 2c9f4ce5..cecf4bed 100644 --- a/2.1.0/arm64/Dockerfile +++ b/2.1.0/arm64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:arm64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" diff --git a/2.1.0/armhf/Dockerfile b/2.1.0/armhf/Dockerfile index 4dc3acc2..e0a0c691 100644 --- a/2.1.0/armhf/Dockerfile +++ b/2.1.0/armhf/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:armhf-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.1.0%2Fopenhab-2.1.0.zip" diff --git a/2.2.0-snapshot/amd64/Dockerfile b/2.2.0-snapshot/amd64/Dockerfile index e6c8f8cd..aa79e6d8 100644 --- a/2.2.0-snapshot/amd64/Dockerfile +++ b/2.2.0-snapshot/amd64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:amd64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz" ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" diff --git a/2.2.0-snapshot/arm64/Dockerfile b/2.2.0-snapshot/arm64/Dockerfile index db660e81..4102c8d0 100644 --- a/2.2.0-snapshot/arm64/Dockerfile +++ b/2.2.0-snapshot/arm64/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:arm64-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" diff --git a/2.2.0-snapshot/armhf/Dockerfile b/2.2.0-snapshot/armhf/Dockerfile index 0f24673c..3fbf2238 100644 --- a/2.2.0-snapshot/armhf/Dockerfile +++ b/2.2.0-snapshot/armhf/Dockerfile @@ -9,6 +9,8 @@ FROM multiarch/debian-debootstrap:armhf-jessie +MAINTAINER openHAB + # Set download urls ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz" ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.2.0-SNAPSHOT.zip" diff --git a/README.md b/README.md index 8e01d21d..51d69b5d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Repository for building Docker containers for [openHAB](http://openhab.org) (Hom * [``1.8.3`` Stable openHAB 1.8 version](https://github.com/openhab/openhab-docker/blob/master/1.8.3/amd64/Dockerfile) * [``2.0.0`` Stable openHAB 2.0 version](https://github.com/openhab/openhab-docker/blob/master/2.0.0/amd64/Dockerfile) * [``2.1.0`` Stable openHAB 2.1 version](https://github.com/openhab/openhab-docker/blob/master/2.1.0/amd64/Dockerfile) -* [``2.2.0-snapshot`` Experimental openHAB 2.1 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.2.0-snapshot/amd64/Dockerfile) +* [``2.2.0-snapshot`` Experimental openHAB 2.2 SNAPSHOT version](https://github.com/openhab/openhab-docker/blob/master/2.2.0-snapshot/amd64/Dockerfile) **Architecture:** diff --git a/update.sh b/update.sh index a11d97ce..300c38d0 100755 --- a/update.sh +++ b/update.sh @@ -56,6 +56,8 @@ print_baseimage() { cat >> $1 <<-EOI FROM multiarch/debian-debootstrap:$arch-jessie + MAINTAINER openHAB + # Set download urls ENV JAVA_URL="$java_url" ENV OPENHAB_URL="$openhab_url"