-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
31 lines (25 loc) · 997 Bytes
/
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
ARG BASE_IMAGE=arm32v7/alpine
FROM $BASE_IMAGE
RUN apk add --no-cache bash tzdata eudev ca-certificates
ENV LANG C.UTF-8
# Build telldus-core
RUN apk add --no-cache \
confuse libftdi1 libstdc++ jq socat \
&& apk add --no-cache --virtual .build-dependencies \
cmake build-base gcc doxygen confuse-dev argp-standalone libftdi1-dev git \
&& ln -s /usr/include/libftdi1/ftdi.h /usr/include/ftdi.h \
&& mkdir -p /usr/src \
&& cd /usr/src \
&& git clone -b master --depth 1 https://github.com/majori/telldus \
&& cd telldus/telldus-core \
&& sed -i "/\<sys\/socket.h\>/a \#include \<sys\/select.h\>" common/Socket_unix.cpp \
&& cmake . -DBUILD_LIBTELLDUS-CORE=ON -DBUILD_TDADMIN=OFF -DBUILD_TDTOOL=ON -DGENERATE_MAN=OFF -DFORCE_COMPILE_FROM_TRUNK=ON -DFTDI_LIBRARY=/usr/lib/libftdi1.so \
&& make \
&& make install \
&& apk del .build-dependencies \
&& rm -rf /usr/src/telldus
WORKDIR /usr
ADD run.sh ./run.sh
RUN chmod a+x ./run.sh
EXPOSE 50800 50801
CMD [ "./run.sh" ]