Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. FROM ubuntu:18.04
  2.  
  3. RUN export DEBIAN_FRONTEND=noninteractive
  4. RUN \
  5. sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
  6. apt-get update && \
  7. apt-get -y upgrade && \
  8. apt-get install -y software-properties-common
  9.  
  10. # PPAs
  11. RUN add-apt-repository -y ppa:myriadrf/drivers && \
  12. add-apt-repository -y ppa:myriadrf/gnuradio && \
  13. add-apt-repository -y ppa:gqrx/gqrx-sdr && \
  14. add-apt-repository -y ppa:bladerf/bladerf && \
  15. apt-get -y update
  16.  
  17. # Install GNURadio and GQRX from PPA
  18. # TODO: Install both from source so we can be more portable.
  19. #RUN apt-get -y install libgnuradio-osmosdr0.1.4
  20. RUN apt-get -y install gqrx-sdr soapysdr-tools soapysdr-module-lms7
  21.  
  22.  
  23. # Build deps
  24. # TODO: Validate
  25. RUN apt-get install -y cmake g++ libpython-dev python-numpy swig \
  26. git g++ cmake libsqlite3-dev libsoapysdr-dev libi2c-dev \
  27. libusb-1.0-0-dev libwxgtk3.0-dev freeglut3-dev \
  28. libboost-all-dev python-mako doxygen python-docutils \
  29. build-essential wget
  30.  
  31. # Build some stuff from source
  32. # All of this gets installed as dependencies to gqrx, only install
  33. # if we need fresh builds.
  34.  
  35. #ENV LD_PRELOAD_DIR /usr/local/lib:/usr/local/lib64
  36.  
  37. # Soapy is installed with gqrx
  38. #WORKDIR /home/base
  39. #RUN git clone https://github.com/pothosware/SoapySDR.git
  40. #RUN git clone https://github.com/pothosware/SoapyRTLSDR.git
  41. #RUN git clone https://github.com/steve-m/librtlsdr.git
  42.  
  43. #WORKDIR /home/base/SoapySDR/build
  44. #RUN cmake ../ && make -j4 && make install && ldconfig
  45. #WORKDIR /home/base/SoapyRTLSDR/build
  46. #RUN cmake ../ && make -j4 && make install && ldconfig
  47. #WORKDIR /home/base/librtlsdr/build
  48. #RUN cmake ../ && make -j4 && make install && ldconfig
  49.  
  50. # These are not included in the gqrx package install
  51. WORKDIR /home/base
  52. RUN git clone https://github.com/myriadrf/LimeSuite.git
  53. RUN git clone https://github.com/sparklespdx/gr-limesdr.git
  54.  
  55. WORKDIR /home/base/LimeSuite/builddir
  56. RUN cmake ../ && make -j4 && make install && ldconfig
  57. WORKDIR /home/base/gr-limesdr/build
  58. RUN cmake ../ && make -j4 && make install && ldconfig
  59.  
  60. # Set up user for X forwarding and dropping privs
  61. # NOTE: My uid is 1000, yours might not be.
  62. RUN apt-get -y install sudo
  63.  
  64. WORKDIR /home
  65. RUN rm -rf base
  66. RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  67.  
  68. RUN export uid=1000 gid=1000 && \
  69. mkdir -p /home/radiodev && \
  70. echo "radiodev:x:${uid}:${gid}:Radiodev,,,:/home/radiodev:/bin/bash" >> /etc/passwd && \
  71. echo "radiodev:x:${uid}:" >> /etc/group && \
  72. echo "radiodev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/radiodev && \
  73. chmod 0440 /etc/sudoers.d/radiodev && \
  74. chown ${uid}:${gid} -R /home/radiodev && \
  75. gpasswd -a radiodev audio
  76.  
  77. COPY 64-limesuite.rules /etc/udev/rules.d/
  78. COPY pulse-client.conf /etc/pulse/client.conf
  79. USER radiodev
  80. # This takes forever; run when container is running and ~ is mounted.
  81. #RUN volk_profile
  82. WORKDIR /home/radiodev
  83. ENV HOME /home/radiodev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement