46 lines
896 B
Docker
46 lines
896 B
Docker
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" ]
|