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

Commit e4ebe89

Browse files
committed
Rebase to ubuntu and use pre-built binaries
1 parent 9cd578c commit e4ebe89

File tree

12 files changed

+297
-525
lines changed

12 files changed

+297
-525
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 7 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 44 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM lsiobase/alpine:3.10
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
22

33
# set version label
44
ARG BUILD_DATE
@@ -8,126 +8,59 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
88
LABEL maintainer="saarg"
99

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

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

12865
# copy local files
129-
COPY root/ /
130-
131-
# ports and volumes
132-
EXPOSE 8080 6144 1443
133-
VOLUME /config
66+
COPY root/ /

0 commit comments

Comments
 (0)