forked from robotastic/trunk-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
79 lines (66 loc) · 1.73 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
74
75
76
77
78
79
FROM ubuntu:22.04 AS base
# Install docker for passing the socket to allow for intercontainer exec
RUN apt-get update && \
apt-get -y upgrade &&\
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
docker.io \
fdkaac \
git \
gnupg \
gnuradio \
gnuradio-dev \
gr-funcube \
gr-iqbal \
libairspy-dev \
libairspyhf-dev \
libbladerf-dev \
libboost-all-dev \
libcurl4-openssl-dev \
libfreesrp-dev \
libgmp-dev \
libhackrf-dev \
liborc-0.4-dev \
libpthread-stubs0-dev \
librtlsdr-dev \
libsndfile1-dev \
libsoapysdr-dev \
libssl-dev \
libuhd-dev \
libusb-dev \
libxtrx-dev \
pkg-config \
software-properties-common \
sox \
wget && \
rm -rf /var/lib/apt/lists/*
COPY lib/gr-osmosdr/airspy_source_c.cc.patch /tmp/airspy_source_c.cc.patch
# Fix the error message level for SmartNet
RUN sed -i 's/log_level = debug/log_level = info/g' /etc/gnuradio/conf.d/gnuradio-runtime.conf
# Compile gr-osmosdr ourselves so we can install the Airspy serial number patch
RUN cd /tmp && \
git clone https://git.osmocom.org/gr-osmosdr && \
cd gr-osmosdr && \
git apply ../airspy_source_c.cc.patch && \
mkdir build && \
cd build && \
cmake -DENABLE_NONFREE=TRUE .. && \
make -j$(nproc) && \
make install && \
ldconfig && \
cd /tmp && \
rm -rf gr-osmosdr airspy_source_c.cc.patch
WORKDIR /src
COPY . .
WORKDIR /src/build
RUN cmake .. && make -j$(nproc) && make install
#USER nobody
WORKDIR /app
# GNURadio requires a place to store some files, can only be set via $HOME env var.
ENV HOME=/tmp
CMD trunk-recorder --config=/app/config.json