-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
73 lines (65 loc) · 1.44 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
FROM alpine:3.18 AS build
ENV LANG=C.UTF-8
RUN set -xe \
&& apk update \
&& apk add --no-cache --virtual .build-dependencies \
git \
abuild \
binutils \
build-base \
automake \
autoconf \
argp-standalone \
linux-headers \
libev-dev \
libusb-dev \
cmake \
dev86 \
gcc
RUN set -xe \
&& apk add --no-cache \
udev \
bash \
libusb \
libev \
libgcc \
libstdc++ \
libtool
# ARG is in my Synology Docker version not working - yet
ARG KNXD_VERSION
RUN git clone --branch "$KNXD_VERSION" --depth 1 https://github.com/knxd/knxd.git \
&& cd knxd \
&& chmod 777 ./bootstrap.sh \
&& ./bootstrap.sh \
&& ./configure --disable-systemd \
--enable-busmonitor \
--enable-tpuart \
--enable-usb \
--enable-eibnetipserver \
--enable-eibnetip \
--enable-eibnetserver \
--enable-eibnetiptunnel \
--enable-groupcache \
&& mkdir -p src/include/sys && ln -s /usr/lib/bcc/include/sys/cdefs.h src/include/sys \
&& make \
&& mkdir /install \
&& make DESTDIR=/install install
FROM alpine:3.18
# get needed runtime libs
RUN set -xe \
&& apk add --no-cache \
udev \
bash \
libusb \
libev \
libgcc \
libstdc++ \
libtool \
envsubst
# copy knxd files and libs
COPY --from=build /install/ /
# copy knxd configuration
COPY knxd-template.ini /etc/
COPY init.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/init.sh
ENTRYPOINT ["/bin/sh", "-c", "/usr/local/bin/init.sh && knxd /etc/knxd.ini"]