Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
# Install deCONZ dependencies
RUN apt-get update && \
apt-get install -y \
wget \
gnupg \
gosu \
curl \
kmod \
Expand Down Expand Up @@ -89,13 +91,15 @@ RUN groupadd -g ${DECONZ_GID} "deconz" && \

# Add deCONZ, install deCONZ, make OTAU dir
COPY download-deconz.sh /
RUN chmod +x /download-deconz.sh && \
/download-deconz.sh ${VERSION} ${CHANNEL} ${TARGETPLATFORM}

RUN chmod +x /download-deconz.sh && /download-deconz.sh ${VERSION} ${CHANNEL} ${TARGETPLATFORM}

RUN dpkg -i /deconz.deb && \
# Conditional Install: Only run dpkg if the .deb exists (for arm64/v7)
RUN if [ -f /deconz.deb ]; then \
dpkg -i /deconz.deb && rm /deconz.deb; \
fi && \
chown root:root /usr/bin/deCONZ* && \
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/deCONZ && \
rm -f /deconz.deb
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/deCONZ

VOLUME [ "/opt/deCONZ" ]

Expand Down
22 changes: 18 additions & 4 deletions docker/download-deconz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,28 @@ DECONZ_VERSION=$1
CHANNEL=$2
PLATFORM=$3

if [[ "$PLATFORM" == *"amd64"* ]]; then
# Download key to the modern keyring location
wget -O - http://phoscon.de/apt/deconz.pub.key | gpg --dearmor -o /usr/share/keyrings/deconz.gpg

APT_CHANNEL="generic"
if [ "$CHANNEL" == "beta" ]; then APT_CHANNEL="generic-beta"; fi

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/deconz.gpg] http://phoscon.de/apt/deconz ${APT_CHANNEL} main" > /etc/apt/sources.list.d/deconz.list

apt-get update
apt-get install -y deconz
# Create a flag so the Dockerfile knows skip dpkg
touch /tmp/apt_installed
exit 0
fi

# Fallback for arm64 / v7 (Manual Download)
if echo "${PLATFORM}" | grep -qE "arm64"; then
URL="http://deconz.dresden-elektronik.de/debian/${CHANNEL}/deconz_${DECONZ_VERSION}-debian-buster-${CHANNEL}_arm64.deb"
fi
if echo "${PLATFORM}" | grep -qE "amd64"; then
URL="http://deconz.dresden-elektronik.de/ubuntu/${CHANNEL}/deconz-${DECONZ_VERSION}-qt5.deb"
fi
if echo "${PLATFORM}" | grep -qE "v7"; then
URL="http://deconz.dresden-elektronik.de/raspbian/${CHANNEL}/deconz-${DECONZ_VERSION}-qt5.deb"
fi

curl -vv "${URL}" -o /deconz${DEV}.deb
curl -vv "${URL}" -o /deconz.deb