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

Commit 29a4183

Browse files
committed
adding pipeline logic and multi arching
1 parent 686ad38 commit 29a4183

File tree

7 files changed

+1039
-10
lines changed

7 files changed

+1039
-10
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
FROM lsiobase/alpine:3.7
1+
FROM lsiobase/alpine:3.8
22

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

9-
# package version
10-
ARG DOMOTICZ_VER="4.9700"
11-
1210
# environment settings
1311
ENV HOME="/config"
1412

@@ -78,7 +76,11 @@ RUN \
7876
ln -s /usr/lib/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2 && \
7977
ln -s /usr/lib/libtelldus-core.so.2 /usr/lib/libtelldus-core.so && \
8078
echo "**** build domoticz ****" && \
81-
git clone -b "${DOMOTICZ_VER}" https://github.com/domoticz/domoticz.git /tmp/domoticz && \
79+
if [ -z ${DOMOTICZ_RELEASE+x} ]; then \
80+
DOMOTICZ_RELEASE=$(curl -sX GET "https://api.github.com/repos/domoticz/domoticz/releases/latest" \
81+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
82+
fi && \
83+
git clone -b "${DOMOTICZ_RELEASE}" https://github.com/domoticz/domoticz.git /tmp/domoticz && \
8284
cd /tmp/domoticz && \
8385
cmake \
8486
-DBUILD_SHARED_LIBS=True \

Dockerfile.aarch64

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
FROM lsiobase/alpine.arm64:3.8
2+
3+
# Add qemu to build on x86_64 systems
4+
COPY qemu-aarch64-static /usr/bin
5+
6+
# set version label
7+
ARG BUILD_DATE
8+
ARG VERSION
9+
ARG DOMOTICZ_RELEASE
10+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
11+
LABEL maintainer="saarg"
12+
13+
# environment settings
14+
ENV HOME="/config"
15+
16+
# copy prebuilds
17+
COPY patches/ /
18+
19+
RUN \
20+
echo "**** install build packages ****" && \
21+
apk add --no-cache --virtual=build-dependencies \
22+
argp-standalone \
23+
autoconf \
24+
automake \
25+
binutils \
26+
boost-dev \
27+
cmake \
28+
confuse-dev \
29+
curl-dev \
30+
doxygen \
31+
eudev-dev \
32+
g++ \
33+
gcc \
34+
git \
35+
gzip \
36+
libcurl \
37+
libftdi1-dev \
38+
libressl-dev \
39+
libusb-compat-dev \
40+
libusb-dev \
41+
linux-headers \
42+
lua5.2-dev \
43+
make \
44+
mosquitto-dev \
45+
musl-dev \
46+
openzwave-dev \
47+
pkgconf \
48+
sqlite-dev \
49+
tar \
50+
zlib-dev && \
51+
echo "**** install runtime packages ****" && \
52+
apk add --no-cache \
53+
curl \
54+
eudev-libs \
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 ****" && \
82+
if [ -z ${DOMOTICZ_RELEASE+x} ]; then \
83+
DOMOTICZ_RELEASE=$(curl -sX GET "https://api.github.com/repos/domoticz/domoticz/releases/latest" \
84+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
85+
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=OFF \
94+
-DUSE_BUILTIN_MQTT=OFF \
95+
-DUSE_BUILTIN_SQLITE=OFF \
96+
-DUSE_STATIC_LIBSTDCXX=OFF \
97+
-DUSE_STATIC_OPENZWAVE=OFF \
98+
-Wno-dev && \
99+
make && \
100+
make install && \
101+
echo "**** install BroadlinkRM2 plugin dependencies ****" && \
102+
git clone https://github.com/mjg59/python-broadlink.git /tmp/python-broadlink && \
103+
cd /tmp/python-broadlink && \
104+
git checkout 8bc67af6 && \
105+
pip3 install . && \
106+
pip3 install pyaes && \
107+
echo "**** determine runtime packages using scanelf ****" && \
108+
RUNTIME_PACKAGES="$( \
109+
scanelf --needed --nobanner /var/lib/domoticz/domoticz \
110+
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
111+
| sort -u \
112+
| xargs -r apk info --installed \
113+
| sort -u \
114+
)" && \
115+
apk add --no-cache \
116+
$RUNTIME_PACKAGES && \
117+
echo "**** add abc to dialout and cron group ****" && \
118+
usermod -a -G 16,20 abc && \
119+
echo " **** cleanup ****" && \
120+
apk del --purge \
121+
build-dependencies && \
122+
rm -rf \
123+
/tmp/* \
124+
/usr/lib/libftdi* \
125+
/usr/include/ftdi.h
126+
127+
# copy local files
128+
COPY root/ /
129+
130+
# ports and volumes
131+
EXPOSE 8080 6144 1443
132+
VOLUME /config

Dockerfile.armhf

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
FROM lsiobase/alpine.armhf:3.8
2+
3+
# Add qemu to build on x86_64 systems
4+
COPY qemu-arm-static /usr/bin
5+
6+
# set version label
7+
ARG BUILD_DATE
8+
ARG VERSION
9+
ARG DOMOTICZ_RELEASE
10+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
11+
LABEL maintainer="saarg"
12+
13+
# environment settings
14+
ENV HOME="/config"
15+
16+
# copy prebuilds
17+
COPY patches/ /
18+
19+
RUN \
20+
echo "**** install build packages ****" && \
21+
apk add --no-cache --virtual=build-dependencies \
22+
argp-standalone \
23+
autoconf \
24+
automake \
25+
binutils \
26+
boost-dev \
27+
cmake \
28+
confuse-dev \
29+
curl-dev \
30+
doxygen \
31+
eudev-dev \
32+
g++ \
33+
gcc \
34+
git \
35+
gzip \
36+
libcurl \
37+
libftdi1-dev \
38+
libressl-dev \
39+
libusb-compat-dev \
40+
libusb-dev \
41+
linux-headers \
42+
lua5.2-dev \
43+
make \
44+
mosquitto-dev \
45+
musl-dev \
46+
openzwave-dev \
47+
pkgconf \
48+
sqlite-dev \
49+
tar \
50+
zlib-dev && \
51+
echo "**** install runtime packages ****" && \
52+
apk add --no-cache \
53+
curl \
54+
eudev-libs \
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 ****" && \
82+
if [ -z ${DOMOTICZ_RELEASE+x} ]; then \
83+
DOMOTICZ_RELEASE=$(curl -sX GET "https://api.github.com/repos/domoticz/domoticz/releases/latest" \
84+
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
85+
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=OFF \
94+
-DUSE_BUILTIN_MQTT=OFF \
95+
-DUSE_BUILTIN_SQLITE=OFF \
96+
-DUSE_STATIC_LIBSTDCXX=OFF \
97+
-DUSE_STATIC_OPENZWAVE=OFF \
98+
-Wno-dev && \
99+
make && \
100+
make install && \
101+
echo "**** install BroadlinkRM2 plugin dependencies ****" && \
102+
git clone https://github.com/mjg59/python-broadlink.git /tmp/python-broadlink && \
103+
cd /tmp/python-broadlink && \
104+
git checkout 8bc67af6 && \
105+
pip3 install . && \
106+
pip3 install pyaes && \
107+
echo "**** determine runtime packages using scanelf ****" && \
108+
RUNTIME_PACKAGES="$( \
109+
scanelf --needed --nobanner /var/lib/domoticz/domoticz \
110+
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
111+
| sort -u \
112+
| xargs -r apk info --installed \
113+
| sort -u \
114+
)" && \
115+
apk add --no-cache \
116+
$RUNTIME_PACKAGES && \
117+
echo "**** add abc to dialout and cron group ****" && \
118+
usermod -a -G 16,20 abc && \
119+
echo " **** cleanup ****" && \
120+
apk del --purge \
121+
build-dependencies && \
122+
rm -rf \
123+
/tmp/* \
124+
/usr/lib/libftdi* \
125+
/usr/include/ftdi.h
126+
127+
# copy local files
128+
COPY root/ /
129+
130+
# ports and volumes
131+
EXPOSE 8080 6144 1443
132+
VOLUME /config

0 commit comments

Comments
 (0)