This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Dockerfile
73 lines (65 loc) · 2.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
# set version label
ARG BUILD_DATE
ARG VERSION
ARG DOMOTICZ_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="saarg"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"
RUN \
echo "**** install runtime packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends \
cron \
libc6 \
libcap2-bin \
libcurl3-gnutls \
libcurl4 \
libpython3.8 \
libudev-dev \
libusb-0.1-4 \
mosquitto-clients \
python3-pip \
python3-requests \
unzip \
wget \
zlib1g && \
echo "**** link to python lib so domoticz finds it ****" && \
ln -s /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 /usr/lib/x86_64-linux-gnu/libpython3.8.so && \
echo "**** install domoticz ****" && \
if [ -z ${DOMOTICZ_RELEASE+x} ]; then \
DOMOTICZ_RELEASE=$(curl -sX GET "https://api.github.com/repos/domoticz/domoticz/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/defaults \
/tmp/domoticz \
/usr/share/domoticz && \
curl -o /tmp/domoticz.tgz -L \
https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz && \
tar xf /tmp/domoticz.tgz -C \
/tmp/domoticz/ && \
mv /tmp/domoticz/domoticz /usr/bin/ && \
mv /tmp/domoticz/www /usr/share/domoticz/ && \
mv /tmp/domoticz/Config /usr/share/domoticz/ && \
mv /tmp/domoticz/scripts /defaults/ && \
mv /tmp/domoticz/dzVents /usr/share/domoticz/ && \
rm -rf /usr/share/domoticz/scripts/update_domoticz && \
rm -rf /usr/share/domoticz/scripts/restart_domoticz && \
rm -rf /usr/share/domoticz/scripts/download_update.sh && \
echo "**** add abc to dialout group ****" && \
usermod -a -G dialout abc && \
echo " **** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# copy local files
COPY root/ /
# expose ports
EXPOSE 1443 6144 8080
VOLUME /config