Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Commit 59277dc

Browse files
committed
Rebase to ubuntu and use pre-built binaries
1 parent b482701 commit 59277dc

File tree

12 files changed

+313
-574
lines changed

12 files changed

+313
-574
lines changed

.github/ISSUE_TEMPLATE.md

-38
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[linuxserverurl]: https://linuxserver.io
44
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
5-
5+
66

77
<!--- Before submitting a pull request please check the following -->
88

9-
<!--- If this is a fix for a typo in code or documentation in the README please file an issue and let us sort it out we do not need a PR -->
9+
<!--- If this is a fix for a typo in code or documentation in the README please file an issue and let us sort it out we do not need a PR -->
1010
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
1111
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
1212
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
@@ -21,11 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-domoticz/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
25-
26-
------------------------------
27-
28-
<!--- We welcome all PR’s though this doesn’t guarantee it will be accepted. -->
24+
We welcome all PR’s though this doesn’t guarantee it will be accepted.
2925

3026
## Description:
3127
<!--- Describe your changes in detail -->

.github/workflows/greetings.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- uses: actions/first-interaction@v1
1010
with:
11-
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-domoticz/blob/master/.github/ISSUE_TEMPLATE.md)!'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-domoticz/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
11+
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [issue template](https://github.com/linuxserver/docker-domoticz/.github/ISSUE_TEMPLATE.md)!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-domoticz/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

+47-124
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,67 @@
1-
FROM lsiobase/alpine:3.10
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
22

33
# set version label
44
ARG BUILD_DATE
55
ARG VERSION
6-
ARG DOMOTICZ_COMMIT
6+
ARG DOMOTICZ_RELEASE
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="saarg"
99

1010
# environment settings
11+
ARG DEBIAN_FRONTEND="noninteractive"
1112
ENV HOME="/config"
1213

13-
# copy prebuilds
14-
COPY patches/ /
1514

1615
RUN \
17-
echo "**** install build packages ****" && \
18-
apk add --no-cache --virtual=build-dependencies \
19-
argp-standalone \
20-
autoconf \
21-
automake \
22-
binutils \
23-
boost-dev \
24-
cmake \
25-
confuse-dev \
26-
curl-dev \
27-
doxygen \
28-
eudev-dev \
29-
g++ \
30-
gcc \
31-
git \
32-
gzip \
33-
jq \
34-
libcurl \
35-
libftdi1-dev \
36-
libressl-dev \
37-
libusb-compat-dev \
38-
libusb-dev \
39-
linux-headers \
40-
make \
41-
mosquitto-dev \
42-
musl-dev \
43-
pkgconf \
44-
sqlite-dev \
45-
tar \
46-
zlib-dev && \
4716
echo "**** install runtime packages ****" && \
48-
apk add --no-cache \
49-
boost \
50-
boost-system \
51-
boost-thread \
17+
apt-get update && \
18+
apt-get install -y --no-install-recommends \
5219
curl \
53-
eudev-libs \
54-
iputils \
55-
libressl \
56-
openssh \
57-
python3-dev && \
58-
echo "**** link libftdi libs ****" && \
59-
ln -s /usr/lib/libftdi1.so /usr/lib/libftdi.so && \
60-
ln -s /usr/lib/libftdi1.a /usr/lib/libftdi.a && \
61-
ln -s /usr/include/libftdi1/ftdi.h /usr/include/ftdi.h && \
62-
echo "**** build telldus-core ****" && \
63-
mkdir -p \
64-
/tmp/telldus-core && \
65-
tar xf /tmp/patches/telldus-core-2.1.2.tar.gz -C \
66-
/tmp/telldus-core --strip-components=1 && \
67-
curl -o /tmp/telldus-core/Doxyfile.in -L \
68-
https://raw.githubusercontent.com/telldus/telldus/master/telldus-core/Doxyfile.in && \
69-
cp /tmp/patches/Socket_unix.cpp /tmp/telldus-core/common/Socket_unix.cpp && \
70-
cp /tmp/patches/ConnectionListener_unix.cpp /tmp/telldus-core/service/ConnectionListener_unix.cpp && \
71-
cp /tmp/patches/CMakeLists.txt /tmp/telldus-core/CMakeLists.txt && \
72-
cd /tmp/telldus-core && \
73-
cmake -DBUILD_TDADMIN=false -DCMAKE_INSTALL_PREFIX=/tmp/telldus-core . && \
74-
make && \
75-
echo "**** configure telldus core ****" && \
76-
mv /tmp/telldus-core/client/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2.1.2 && \
77-
mv /tmp/telldus-core/client/telldus-core.h /usr/include/telldus-core.h && \
78-
ln -s /usr/lib/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2 && \
79-
ln -s /usr/lib/libtelldus-core.so.2 /usr/lib/libtelldus-core.so && \
80-
echo "**** build openzwave ****" && \
81-
git clone https://github.com/OpenZWave/open-zwave.git /tmp/open-zwave && \
82-
ln -s /tmp/open-zwave /tmp/open-zwave-read-only && \
83-
cd /tmp/open-zwave && \
84-
make && \
85-
make \
86-
instlibdir=usr/lib \
87-
pkgconfigdir="usr/lib/pkgconfig/" \
88-
PREFIX=/usr \
89-
sysconfdir=etc/openzwave \
90-
install && \
91-
echo "**** build domoticz ****" && \
92-
if [ -z ${DOMOTICZ_COMMIT+x} ]; then \
93-
DOMOTICZ_COMMIT=$(curl -sX GET https://api.github.com/repos/domoticz/domoticz/commits/development \
94-
| jq -r '. | .sha'); \
20+
cron \
21+
libc6 \
22+
libcap2-bin \
23+
libcurl3-gnutls \
24+
libcurl4 \
25+
libpython3.8 \
26+
libudev-dev \
27+
libusb-0.1-4 \
28+
mosquitto-clients \
29+
python3-pip \
30+
python3-requests \
31+
unzip \
32+
wget \
33+
zlib1g && \
34+
echo "**** link to python lib so domoticz finds it ****" && \
35+
ln -s /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 /usr/lib/x86_64-linux-gnu/libpython3.8.so && \
36+
echo "**** install domoticz ****" && \
37+
if [ -z ${DOMOTICZ_RELEASE+x} ]; then \
38+
DOMOTICZ_RELEASE=$(curl -sX GET "https://api.github.com/repos/domoticz/domoticz/releases/latest" \
39+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
9540
fi && \
96-
git clone https://github.com/domoticz/domoticz.git /tmp/domoticz && \
97-
cd /tmp/domoticz && \
98-
git checkout ${DOMOTICZ_COMMIT} && \
99-
cmake \
100-
-DBUILD_SHARED_LIBS=True \
101-
-DCMAKE_BUILD_TYPE=Release \
102-
-DCMAKE_INSTALL_PREFIX=/var/lib/domoticz \
103-
-DOpenZWave=/usr/lib/libopenzwave.so \
104-
-DUSE_BUILTIN_LUA=ON \
105-
-DUSE_BUILTIN_MQTT=ON \
106-
-DUSE_BUILTIN_SQLITE=OFF \
107-
-DUSE_STATIC_BOOST=OFF \
108-
-DUSE_STATIC_LIBSTDCXX=OFF \
109-
-DUSE_STATIC_OPENZWAVE=OFF \
110-
-Wno-dev && \
111-
make && \
112-
make install && \
113-
echo "**** install BroadlinkRM2 plugin dependencies ****" && \
114-
git clone https://github.com/mjg59/python-broadlink.git /tmp/python-broadlink && \
115-
cd /tmp/python-broadlink && \
116-
git checkout 8bc67af6 && \
117-
pip3 install --no-cache-dir . && \
118-
pip3 install --no-cache-dir pyaes && \
119-
echo "**** determine runtime packages using scanelf ****" && \
120-
RUNTIME_PACKAGES="$( \
121-
scanelf --needed --nobanner /var/lib/domoticz/domoticz \
122-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
123-
| sort -u \
124-
| xargs -r apk info --installed \
125-
| sort -u \
126-
)" && \
127-
apk add --no-cache \
128-
$RUNTIME_PACKAGES && \
129-
echo "**** add abc to dialout and cron group ****" && \
130-
usermod -a -G 16,20 abc && \
41+
mkdir -p \
42+
/defaults \
43+
/tmp/domoticz \
44+
/usr/share/domoticz && \
45+
curl -o /tmp/domoticz.tgz -L \
46+
https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz && \
47+
tar xf /tmp/domoticz.tgz -C \
48+
/tmp/domoticz/ && \
49+
mv /tmp/domoticz/domoticz /usr/bin/ && \
50+
mv /tmp/domoticz/www /usr/share/domoticz/ && \
51+
mv /tmp/domoticz/Config /usr/share/domoticz/ && \
52+
mv /tmp/domoticz/scripts /defaults/ && \
53+
mv /tmp/domoticz/dzVents /usr/share/domoticz/ && \
54+
rm -rf /usr/share/domoticz/scripts/update_domoticz && \
55+
rm -rf /usr/share/domoticz/scripts/restart_domoticz && \
56+
rm -rf /usr/share/domoticz/scripts/download_update.sh && \
57+
echo "**** add abc to dialout group ****" && \
58+
usermod -a -G dialout abc && \
13159
echo " **** cleanup ****" && \
132-
apk del --purge \
133-
build-dependencies && \
60+
apt-get clean && \
13461
rm -rf \
13562
/tmp/* \
136-
/usr/lib/libftdi* \
137-
/usr/include/ftdi.h
63+
/var/lib/apt/lists/* \
64+
/var/tmp/*
13865

13966
# copy local files
140-
COPY root/ /
141-
142-
# ports and volumes
143-
EXPOSE 8080 6144 1443
144-
VOLUME /config
67+
COPY root/ /

0 commit comments

Comments
 (0)