forked from zenitrems/rtl-sdr-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine
38 lines (30 loc) · 1014 Bytes
/
Dockerfile.alpine
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
FROM alpine:3.21 AS builder
# Install packages
RUN apk add --no-cache \
libusb-dev \
git cmake pkgconf \
make gcc g++
# Get driver repository
RUN git clone https://github.com/osmocom/rtl-sdr /workspace
# Compile drivers
RUN cd /workspace && \
mkdir build && \
cd build && \
cmake ../ -DINSTALL_UDEV_RULES=ON && \
make && \
make install DESTDIR="$PWD/install"
FROM alpine:3.21
# Install packages
RUN apk add --no-cache \
libusb-dev
# Copy built files from builder
COPY --from=builder /workspace/build/install/usr/local/bin/* /usr/local/bin/
COPY --from=builder /workspace/build/install/usr/local/include/* /usr/local/include/
COPY --from=builder /workspace/build/install/usr/local/lib/* /usr/local/lib/
# Ensure rtl_tcp is executable and Install the drivers
RUN chmod +x /usr/local/bin/rtl_tcp && \
ldconfig /usr/local/bin/ && \
ldconfig /usr/local/include/ && \
ldconfig /usr/local/lib/
# Execute RTL server
ENTRYPOINT ["rtl_tcp", "-a", "0.0.0.0"]