forked from mliljedahl/telldus-core-mqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (40 loc) · 1.17 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
FROM python:3-alpine3.14
# Compile telldus-core source
WORKDIR /usr/src/
COPY telldus /usr/src/telldus
RUN apk add --no-cache \
confuse \
libftdi1 \
libstdc++ \
supervisor
RUN apk add --no-cache --virtual .build-dependencies \
confuse-dev \
cmake \
gcc \
g++ \
libftdi1-dev \
libtool \
make \
musl-dev \
&& cd telldus/telldus-core \
&& cmake . -DBUILD_LIBTELLDUS-CORE=ON -DBUILD_TDADMIN=OFF -DBUILD_TDTOOL=ON -DFORCE_COMPILE_FROM_TRUNK=ON \
&& make -j$(nproc) \
&& make \
&& make install \
&& apk del .build-dependencies \
&& rm -rf /usr/src/telldus
# telldus-core-mqtt
WORKDIR /usr/src/telldus-core-mqtt
COPY requirements.txt ./
RUN python -m pip install --upgrade pip \
&& pip3 install --no-cache-dir -r requirements.txt
ENV PYTHONUNBUFFERED=1
RUN ln -s /usr/local/bin/tellcore_events /usr/bin/tdevents \
&& ln -s /usr/local/bin/tellcore_controllers /usr/bin/tdcontroller
COPY main.py ./
COPY config_default.yaml ./
COPY logging.yaml ./
COPY src ./src
# supervisord
COPY supervisord.conf /etc/supervisord.conf
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]