-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathDockerfile
45 lines (34 loc) · 896 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base:3.19
FROM $BUILD_FROM as builder
MAINTAINER pbkhrv@pm.me
ENV LANG C.UTF-8
# Copied with minor edits from https://github.com/hertzg/rtl_433_docker/blob/master/images/alpine/build-context/Dockerfile
RUN apk add --no-cache --virtual .buildDeps \
build-base \
libusb-dev \
librtlsdr-dev \
cmake \
git
WORKDIR /build
RUN git clone https://github.com/merbanan/rtl_433
WORKDIR ./rtl_433
# Build a specific commit or tag.
ARG rtl433GitRevision=23.11
RUN git checkout ${rtl433GitRevision}
WORKDIR ./build
RUN cmake ..
RUN make -j 4
WORKDIR /build/root
WORKDIR /build/rtl_433/build
RUN make DESTDIR=/build/root/ install
FROM $BUILD_FROM
ENV LANG C.UTF-8
RUN apk add --no-cache libusb \
librtlsdr \
sed
WORKDIR /root
COPY --from=builder /build/root/ /
# Run script
COPY run.sh /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]