FROM ubuntu:22.04
LABEL maintainer="Guillermo Lena"
# You use this mode when you need zero interaction while installing or upgrading the system via apt.
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN apt-get update && apt-get install -y \
xterm \
cmake \
software-properties-common \
git
RUN apt-get update && apt-get install -y \
libusb-1.0-0-dev \
libssl-dev \
liborc-dev \
libzmq5 \
libzmq3-dev
\
swig \
python3 \
python3-pip \
vim \
nano \
gcc-10 g++-10 \
libboost-all-dev \
libcppunit-dev \
liblog4cpp5-dev \
python3-pygccxml \
pybind11-dev
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
# else it will output an error about Gtk namespace not found
RUN apt-get install -y gir1.2-gtk-3.0
# to have add-apt-repository available
RUN apt-get install -y software-properties-common
# create user gnuario with sudo (and password gnuradio)
RUN apt-get install -y sudo
RUN useradd --create-home --shell /bin/bash -G sudo gnuradio
RUN echo 'gnuradio:gnuradio' | chpasswd
# I create a dir at home which I'll use to persist after the container is closed (need to change it's ownership)
RUN mkdir /home/gnuradio/persistent-folder && chown gnuradio /home/gnuradio/persistent-folder
#RUN apt-get update
RUN add-apt-repository -y ppa:gnuradio/gnuradio-releases
RUN apt-get update && apt-get install -y gnuradio
# installing other packages needed for downloading and installing OOT modules
RUN apt-get install -y gnuradio-dev
# gr-satlaba
COPY ./gr-satlab-v20230207.tar.xz /
RUN tar -xf gr-satlab-v20230207.tar.xz
WORKDIR /gr-satlab-v20230207/
RUN mkdir build
WORKDIR /gr-satlab-v20230207/build/
RUN cmake .. && make && make install && ldconfig
WORKDIR /gr-satlab-v20230207/grc/
RUN mkdir build
WORKDIR /gr-satlab-v20230207/grc/build/
RUN cmake .. && make && make install && ldconfig
WORKDIR /
# of course, nothing useful can be done without vim
RUN apt-get install -y vim
# Fix dependency issue as noted on 'InstallingGR' wiki page for 3.10
RUN pip install packaging
USER gnuradio
WORKDIR /home/gnuradio
ENV PYTHONPATH "${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
WORKDIR /
CMD bash