1
- FROM lsiobase/alpine:3.6
2
- MAINTAINER saarg
3
-
4
- # package version
5
- ARG DOMOTICZ_VER="3.8153"
1
+ FROM lsiobase/alpine:3.7
6
2
7
3
# set version label
8
4
ARG BUILD_DATE
9
5
ARG VERSION
10
6
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
7
+ LABEL maintainer="saarg"
8
+
9
+ # package version
10
+ ARG DOMOTICZ_VER="3.8153"
11
11
12
- # Environment settings
12
+ # environment settings
13
13
ENV HOME="/config"
14
14
15
15
# copy prebuilds
16
16
COPY patches/ /
17
17
18
- # install build dependencies
19
18
RUN \
19
+ echo "**** install build packages ****" && \
20
20
apk add --no-cache --virtual=build-dependencies \
21
21
argp-standalone \
22
22
autoconf \
@@ -47,21 +47,18 @@ RUN \
47
47
sqlite-dev \
48
48
tar \
49
49
zlib-dev && \
50
-
51
- # install runtime packages
50
+ echo "**** install runtime packages ****" && \
52
51
apk add --no-cache \
53
52
curl \
54
53
eudev-libs \
55
54
libressl \
56
55
openzwave \
57
56
python3-dev && \
58
-
59
- # link libftdi as the alpine guys named the libs wrong
57
+ echo "**** link libftdi libs ****" && \
60
58
ln -s /usr/lib/libftdi1.so /usr/lib/libftdi.so && \
61
59
ln -s /usr/lib/libftdi1.a /usr/lib/libftdi.a && \
62
60
ln -s /usr/include/libftdi1/ftdi.h /usr/include/ftdi.h && \
63
-
64
- # build telldus-core
61
+ echo "**** build telldus-core ****" && \
65
62
mkdir -p \
66
63
/tmp/telldus-core && \
67
64
curl -o /tmp/telldus-core.tar.gz -L \
@@ -76,14 +73,12 @@ RUN \
76
73
cd /tmp/telldus-core && \
77
74
cmake -DBUILD_TDADMIN=false -DCMAKE_INSTALL_PREFIX=/tmp/telldus-core . && \
78
75
make && \
79
-
80
- # move needed telldus core files and link them
76
+ echo "**** configure telldus core ****" && \
81
77
mv /tmp/telldus-core/client/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2.1.2 && \
82
78
mv /tmp/telldus-core/client/telldus-core.h /usr/include/telldus-core.h && \
83
79
ln -s /usr/lib/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2 && \
84
80
ln -s /usr/lib/libtelldus-core.so.2 /usr/lib/libtelldus-core.so && \
85
-
86
- # build domoticz
81
+ echo "**** build domoticz ****" && \
87
82
git clone -b "${DOMOTICZ_VER}" https://github.com/domoticz/domoticz.git /tmp/domoticz && \
88
83
cd /tmp/domoticz && \
89
84
cmake \
97
92
-DUSE_STATIC_LIBSTDCXX=OFF \
98
93
-DUSE_STATIC_OPENZWAVE=OFF \
99
94
-Wno-dev && \
100
- # attempt to set number of cores available for make to use
95
+ echo "**** attempt to set number of cores available for make to use ****" && \
101
96
set -ex && \
102
97
CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \
103
98
if echo $CPU_CORES | grep -E -q '^[0-9]+$' ; then \
@@ -109,28 +104,22 @@ RUN \
109
104
elif [ "$CPU_CORES" -gt 3 ]; then \
110
105
CPU_CORES=$(( CPU_CORES - 1 )); fi \
111
106
else CPU_CORES="1" ; fi && \
112
-
113
107
make -j $CPU_CORES && \
114
108
make install && \
115
109
set +ex && \
116
-
117
- # determine runtime packages
110
+ echo "**** determine runtime packages using scanelf ****" && \
118
111
RUNTIME_PACKAGES="$( \
119
112
scanelf --needed --nobanner /var/lib/domoticz/domoticz \
120
113
| awk '{ gsub(/,/, " \n so:", $2); print " so:" $2 }' \
121
114
| sort -u \
122
115
| xargs -r apk info --installed \
123
116
| sort -u \
124
117
)" && \
125
-
126
- # install runtime packages
127
118
apk add --no-cache \
128
119
$RUNTIME_PACKAGES && \
129
-
130
- # add abc to dialout and cron group trying to fix different GID for dialout group
120
+ echo "**** add abc to dialout and cron group ****" && \
131
121
usermod -a -G 16,20 abc && \
132
-
133
- # cleanup
122
+ echo " **** cleanup ****" && \
134
123
apk del --purge \
135
124
build-dependencies && \
136
125
rm -rf \
0 commit comments