Update docker file (#719)

Pin base image ubuntu LTS version. add installation python3 with python3-yaml package. create python link in PATH for build hackrf dependency,
This commit is contained in:
igolyudov
2022-10-03 22:56:04 +03:00
committed by GitHub
parent c80595db7e
commit 310fbd53ec

View File

@@ -1,6 +1,6 @@
#Download base image. #Download base image.
#The ubuntu:latest tag points to the "latest LTS" #The ubuntu:20.04 tag points to the "20.04 LTS"
FROM ubuntu:latest FROM ubuntu:20.04
#Set location to download ARM toolkit from. #Set location to download ARM toolkit from.
# This will need to be changed over time or replaced with a static link to the latest release. # This will need to be changed over time or replaced with a static link to the latest release.
@@ -14,7 +14,7 @@ COPY ./ /havocsrc
#Fetch dependencies from APT #Fetch dependencies from APT
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y tar wget dfu-util cmake python bzip2 curl && \ apt-get install -y tar wget dfu-util cmake python bzip2 curl python3 python3-yaml && \
apt-get -qy autoremove apt-get -qy autoremove
#Install current pip from PyPa #Install current pip from PyPa
@@ -23,7 +23,9 @@ RUN curl https://bootstrap.pypa.io/pip/3.4/get-pip.py -o get-pip.py && \
#Fetch additional dependencies from Python 2.x pip #Fetch additional dependencies from Python 2.x pip
RUN pip install pyyaml RUN pip install pyyaml
RUN ln -s /usr/bin/python3 /usr/bin/python && \ RUN rm -rf /usr/bin/python && \
rm -rf /usr/bin/pip && \
ln -s /usr/bin/python3 /usr/bin/python && \
ln -s /usr/bin/pip3 /usr/bin/pip ln -s /usr/bin/pip3 /usr/bin/pip
ENV LANG C.UTF-8 ENV LANG C.UTF-8
@@ -43,3 +45,4 @@ CMD cd /havocsrc && \
mkdir build && cd build && \ mkdir build && cd build && \
cmake .. && make firmware && \ cmake .. && make firmware && \
cp /portapack-havoc/firmware/portapack-h1-havoc.bin /havocbin cp /portapack-havoc/firmware/portapack-h1-havoc.bin /havocbin