Created 2.1.0-snapshot version for development (#58)
* fixed broken build for arm64. migrated from ubuntu to debian jessie. migrated from oraclejdk to openjdk8 * Removed FLAVOR from build files. Rework on readme.md * initial commit for version 2.1.0-snapshot to better track changes. * oved to azul zulu java, removed entryfile and gosu. image layers optimized.pull/60/head
parent
e8373e6b6f
commit
7544f91693
|
@ -13,7 +13,7 @@ install:
|
||||||
- docker run --rm $DOCKER_REPO:$TARGET uname -a
|
- docker run --rm $DOCKER_REPO:$TARGET uname -a
|
||||||
after_success:
|
after_success:
|
||||||
- docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
|
- docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
|
||||||
- docker push $DOCKER_REPO:$TARGET
|
- docker push $DOCKER_REPO:$VERSION-$TARGET
|
||||||
env:
|
env:
|
||||||
#global:
|
#global:
|
||||||
# - DOCKER_REPO=openhab/openhab
|
# - DOCKER_REPO=openhab/openhab
|
||||||
|
@ -25,6 +25,9 @@ env:
|
||||||
- TARGET=amd64 VERSION=2.0.0
|
- TARGET=amd64 VERSION=2.0.0
|
||||||
- TARGET=armhf VERSION=2.0.0
|
- TARGET=armhf VERSION=2.0.0
|
||||||
- TARGET=arm64 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
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
# 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 OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip"
|
||||||
|
ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz"
|
||||||
|
|
||||||
|
# Set variables
|
||||||
|
ENV \
|
||||||
|
APPDIR="/openhab" \
|
||||||
|
OPENHAB_HTTP_PORT='8080' \
|
||||||
|
OPENHAB_HTTPS_PORT='8443' \
|
||||||
|
EXTRA_JAVA_OPTS='' \
|
||||||
|
JAVA_HOME='/usr/lib/java-8'
|
||||||
|
|
||||||
|
# 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 \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
&& 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}
|
||||||
|
|
||||||
|
# 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
|
||||||
|
RUN adduser --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
|
||||||
|
|
||||||
|
# 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 && \
|
||||||
|
chown -R openhab:openhab ${APPDIR} && \
|
||||||
|
echo "export TERM=dumb" | tee -a ~/.bashrc
|
||||||
|
|
||||||
|
# Expose volume with configuration and userdata dir
|
||||||
|
WORKDIR ${APPDIR}
|
||||||
|
VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons
|
||||||
|
EXPOSE 8080 8443 5555
|
||||||
|
USER openhab
|
||||||
|
CMD ["./start.sh"]
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
# 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 OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip"
|
||||||
|
ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz"
|
||||||
|
|
||||||
|
# Set variables
|
||||||
|
ENV \
|
||||||
|
APPDIR="/openhab" \
|
||||||
|
OPENHAB_HTTP_PORT='8080' \
|
||||||
|
OPENHAB_HTTPS_PORT='8443' \
|
||||||
|
EXTRA_JAVA_OPTS='' \
|
||||||
|
JAVA_HOME='/usr/lib/java-8'
|
||||||
|
|
||||||
|
# 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 \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
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}
|
||||||
|
|
||||||
|
# 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
|
||||||
|
RUN adduser --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
|
||||||
|
|
||||||
|
# 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 && \
|
||||||
|
chown -R openhab:openhab ${APPDIR} && \
|
||||||
|
echo "export TERM=dumb" | tee -a ~/.bashrc
|
||||||
|
|
||||||
|
# Expose volume with configuration and userdata dir
|
||||||
|
WORKDIR ${APPDIR}
|
||||||
|
VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons
|
||||||
|
EXPOSE 8080 8443 5555
|
||||||
|
USER openhab
|
||||||
|
CMD ["./start.sh"]
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
# 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 OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip"
|
||||||
|
ENV JAVA_URL="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz"
|
||||||
|
|
||||||
|
# Set variables
|
||||||
|
ENV \
|
||||||
|
APPDIR="/openhab" \
|
||||||
|
OPENHAB_HTTP_PORT='8080' \
|
||||||
|
OPENHAB_HTTPS_PORT='8443' \
|
||||||
|
EXTRA_JAVA_OPTS='' \
|
||||||
|
JAVA_HOME='/usr/lib/java-8'
|
||||||
|
|
||||||
|
# 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 \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
&& 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}
|
||||||
|
|
||||||
|
# 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
|
||||||
|
RUN adduser --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
|
||||||
|
|
||||||
|
# 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 && \
|
||||||
|
chown -R openhab:openhab ${APPDIR} && \
|
||||||
|
echo "export TERM=dumb" | tee -a ~/.bashrc
|
||||||
|
|
||||||
|
# Expose volume with configuration and userdata dir
|
||||||
|
WORKDIR ${APPDIR}
|
||||||
|
VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons
|
||||||
|
EXPOSE 8080 8443 5555
|
||||||
|
USER openhab
|
||||||
|
CMD ["./start.sh"]
|
||||||
|
|
108
update.sh
108
update.sh
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
# Dockerfiles to be generated
|
# Dockerfiles to be generated. At the moment we will focus on version 2.1.0-snapshot, because 2.0.0 is stable.
|
||||||
versions="2.0.0"
|
versions="2.1.0-snapshot"
|
||||||
arches="amd64 armhf arm64"
|
arches="amd64 armhf arm64"
|
||||||
|
|
||||||
# Generate header
|
# Generate header
|
||||||
|
@ -24,20 +24,21 @@ print_header() {
|
||||||
print_baseimage() {
|
print_baseimage() {
|
||||||
case $arch in
|
case $arch in
|
||||||
amd64)
|
amd64)
|
||||||
baseimage="multiarch/debian-debootstrap:amd64-jessie"
|
java_url="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_x64.tar.gz"
|
||||||
;;
|
;;
|
||||||
armhf)
|
armhf|arm64)
|
||||||
baseimage="multiarch/debian-debootstrap:armhf-jessie"
|
java_url="https://www.azul.com/downloads/zulu/zdk-8-ga-linux_aarch32hf.tar.gz"
|
||||||
;;
|
|
||||||
arm64)
|
|
||||||
baseimage="multiarch/debian-debootstrap:arm64-jessie"
|
|
||||||
;;
|
;;
|
||||||
default)
|
default)
|
||||||
baseimage="error"
|
java_url="error"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
cat >> $1 <<-EOI
|
cat >> $1 <<-EOI
|
||||||
FROM $baseimage
|
FROM multiarch/debian-debootstrap:$arch-jessie
|
||||||
|
|
||||||
|
# Set download urls
|
||||||
|
ENV OPENHAB_URL="https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip"
|
||||||
|
ENV JAVA_URL="$java_url"
|
||||||
|
|
||||||
EOI
|
EOI
|
||||||
}
|
}
|
||||||
|
@ -45,8 +46,13 @@ print_baseimage() {
|
||||||
# Print metadata && basepackages
|
# Print metadata && basepackages
|
||||||
print_basepackages() {
|
print_basepackages() {
|
||||||
cat >> $1 <<-'EOI'
|
cat >> $1 <<-'EOI'
|
||||||
ARG DOWNLOAD_URL="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip"
|
# Set variables
|
||||||
ENV APPDIR="/openhab" OPENHAB_HTTP_PORT='8080' OPENHAB_HTTPS_PORT='8443' EXTRA_JAVA_OPTS=''
|
ENV \
|
||||||
|
APPDIR="/openhab" \
|
||||||
|
OPENHAB_HTTP_PORT='8080' \
|
||||||
|
OPENHAB_HTTPS_PORT='8443' \
|
||||||
|
EXTRA_JAVA_OPTS='' \
|
||||||
|
JAVA_HOME='/usr/lib/java-8'
|
||||||
|
|
||||||
# Basic build-time metadata as defined at http://label-schema.org
|
# Basic build-time metadata as defined at http://label-schema.org
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
@ -60,43 +66,36 @@ print_basepackages() {
|
||||||
org.label-schema.vcs-type="Git" \
|
org.label-schema.vcs-type="Git" \
|
||||||
org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git"
|
org.label-schema.vcs-url="https://github.com/openhab/openhab-docker.git"
|
||||||
|
|
||||||
# Install Basepackages
|
# Install basepackages
|
||||||
RUN \
|
RUN apt-get update && \
|
||||||
apt-get update && \
|
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
|
ca-certificates \
|
||||||
unzip \
|
unzip \
|
||||||
wget \
|
wget \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install gosu
|
EOI
|
||||||
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)" \
|
# Print 32-bit for arm64 arch
|
||||||
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
|
print_lib32_support_arm64() {
|
||||||
&& export GNUPGHOME="$(mktemp -d)" \
|
cat >> $1 <<-'EOI'
|
||||||
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
|
RUN dpkg --add-architecture armhf && \
|
||||||
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
|
apt-get update && \
|
||||||
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
|
apt-get install --no-install-recommends -y \
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
libc6:armhf \
|
||||||
&& gosu nobody true
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EOI
|
EOI
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install Oracle Java
|
# Install java
|
||||||
print_java() {
|
print_java() {
|
||||||
cat >> $1 <<-'EOI'
|
cat >> $1 <<-'EOI'
|
||||||
# Install Oracle Java
|
# Install java
|
||||||
RUN \
|
RUN wget -nv -O /tmp/java.tar.gz ${JAVA_URL} &&\
|
||||||
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
|
mkdir ${JAVA_HOME} && \
|
||||||
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
|
tar -xvf /tmp/java.tar.gz --strip-components=1 -C ${JAVA_HOME}
|
||||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
|
|
||||||
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install --no-install-recommends -y oracle-java8-installer && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
rm -rf /var/cache/oracle-jdk8-installer
|
|
||||||
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
|
|
||||||
|
|
||||||
EOI
|
EOI
|
||||||
}
|
}
|
||||||
|
@ -121,29 +120,24 @@ print_openhab() {
|
||||||
adduser openhab uucp3 &&\
|
adduser openhab uucp3 &&\
|
||||||
adduser openhab gpio
|
adduser openhab gpio
|
||||||
|
|
||||||
WORKDIR ${APPDIR}
|
# Install openhab
|
||||||
|
|
||||||
RUN \
|
|
||||||
wget -nv -O /tmp/openhab.zip ${DOWNLOAD_URL} &&\
|
|
||||||
unzip -q /tmp/openhab.zip -d ${APPDIR} &&\
|
|
||||||
rm /tmp/openhab.zip
|
|
||||||
|
|
||||||
RUN mkdir -p ${APPDIR}/userdata/logs && touch ${APPDIR}/userdata/logs/openhab.log
|
|
||||||
|
|
||||||
# Copy directories for host volumes
|
|
||||||
RUN cp -a /openhab/userdata /openhab/userdata.dist && \
|
|
||||||
cp -a /openhab/conf /openhab/conf.dist
|
|
||||||
COPY entrypoint.sh /
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|
||||||
# Set permissions for openhab. Export TERM variable. See issue #30 for details!
|
# Set permissions for openhab. Export TERM variable. See issue #30 for details!
|
||||||
RUN chown -R openhab:openhab ${APPDIR} && \
|
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 && \
|
||||||
|
chown -R openhab:openhab ${APPDIR} && \
|
||||||
echo "export TERM=dumb" | tee -a ~/.bashrc
|
echo "export TERM=dumb" | tee -a ~/.bashrc
|
||||||
|
|
||||||
# Expose volume with configuration and userdata dir
|
# Expose volume with configuration and userdata dir
|
||||||
|
WORKDIR ${APPDIR}
|
||||||
VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons
|
VOLUME ${APPDIR}/conf ${APPDIR}/userdata ${APPDIR}/addons
|
||||||
EXPOSE 8080 8443 5555
|
EXPOSE 8080 8443 5555
|
||||||
CMD ["server"]
|
USER openhab
|
||||||
|
CMD ["./start.sh"]
|
||||||
|
|
||||||
EOI
|
EOI
|
||||||
}
|
}
|
||||||
|
@ -159,9 +153,11 @@ do
|
||||||
print_header $file;
|
print_header $file;
|
||||||
print_baseimage $file;
|
print_baseimage $file;
|
||||||
print_basepackages $file;
|
print_basepackages $file;
|
||||||
|
if [ "$arch" == "arm64" ]; then
|
||||||
|
print_lib32_support_arm64 $file;
|
||||||
|
fi
|
||||||
print_java $file;
|
print_java $file;
|
||||||
print_openhab $file;
|
print_openhab $file;
|
||||||
cp entrypoint.sh `dirname $file`
|
|
||||||
echo "done"
|
echo "done"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue