Skip to content

Commit

Permalink
Merge pull request #448 from robbiet480/armv7-docker
Browse files Browse the repository at this point in the history
Unified Dockerfile that gets builds working on armv7 and optimizes deps
  • Loading branch information
robotastic committed Mar 26, 2021
2 parents bde84b3 + 805a5a8 commit 3d8beef
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,49 @@
FROM robotastic/gnuradio:nightly
FROM ubuntu:20.04 AS base

# Install everything except cmake
RUN apt-get update && \
apt-get -y upgrade &&\
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
apt-transport-https \
build-essential \
ca-certificates \
fdkaac \
git \
gnupg \
gnuradio \
gnuradio-dev \
gr-osmosdr \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libhackrf-dev \
liborc-0.4-dev \
libpthread-stubs0-dev \
libssl-dev \
libuhd-dev \
libusb-dev \
pkg-config \
software-properties-common \
sox && \
rm -rf /var/lib/apt/lists/*

# Need to install newer cmake than what's in Ubuntu repo to build armv7 due to this:
# https://gitlab.kitware.com/cmake/cmake/-/issues/20568
RUN curl https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
apt-get update && \
export DEBIAN_FRONTEND=noninteractive && apt-get install -y cmake && rm -rf /var/lib/apt/lists/*

WORKDIR /src

COPY . .

RUN cmake . && make && cp recorder /recorder
RUN cmake . && make -j`nproc` && cp recorder /recorder

USER nobody

# GNURadio requires a place to store some files, can only be set via $HOME env var.
ENV HOME=/tmp

CMD ["/recorder", "--config=/app/config.json"]

0 comments on commit 3d8beef

Please sign in to comment.