-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 946 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
# Builder
FROM alpine:3.21.3 AS builder
ARG UPSTREAM_REMOTE
ARG UPSTREAM_BRANCH
ARG UPSTREAM_COMMIT
# Packages
RUN apk add --no-cache build-base cmake git librtlsdr-dev && \
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing/ soapy-sdr-dev
# Workdir
WORKDIR /app
# Get SoapySDR-RTLSDR
RUN git clone -b ${UPSTREAM_BRANCH} ${UPSTREAM_REMOTE} . && \
git -c advice.detachedHead=false checkout ${UPSTREAM_COMMIT}
# Compile
RUN mkdir build install && \
cd build && \
cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_WARN_DEPRECATED=False && \
make && make install
# Release
FROM alpine:3.21.3 AS release
# Packages
RUN apk add --no-cache librtlsdr && \
apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing/ soapy-sdr-libs
# Workdir
WORKDIR /app
# Copy SoapySDR and SoapySDR-RTLSDR
COPY --from=builder /app/install/ /usr/local