Browse Source

Enable the analysis scripts to be run within the docker as well

Ian Goldberg 4 years ago
parent
commit
55b9517da3
2 changed files with 6 additions and 3 deletions
  1. 5 3
      Dockerfile.in
  2. 1 0
      build-docker

+ 5 - 3
Dockerfile.in

@@ -1,14 +1,16 @@
 FROM ubuntu:18.04
 RUN apt update
-RUN apt install -y python3 python3-pip python3-dev build-essential screen sudo psmisc
-RUN pip3 install merklelib
-RUN pip3 install pynacl
+RUN apt install -y python3 python3-pip python3-dev python3-sympy build-essential screen sudo psmisc gnuplot-nox
+RUN pip3 install merklelib==1.0
+RUN pip3 install pynacl==1.3.0
 RUN groupadd -g GROUP_ID walkingo
 RUN useradd -g walkingo -u USER_ID -m -s /bin/bash walkingo
 RUN adduser walkingo sudo
 RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
 USER walkingo
 WORKDIR /home/walkingo
+RUN mkdir analysis
 ENV SHELL=/bin/bash
 
 COPY --chown=walkingo:walkingo client.py dirauth.py network.py relay.py simulator.py .screenrc ./
+COPY --chown=walkingo:walkingo analytical.py bytecounts.py parselogs.py plotdats.py analysis/

+ 1 - 0
build-docker

@@ -3,5 +3,6 @@
 mkdir -p docker
 sed "s/USER_ID/$(id -u)/; s/GROUP_ID/$(id -g)/" Dockerfile.in > docker/Dockerfile
 cp -av client.py dirauth.py network.py relay.py simulator.py docker/
+cp -av analysis/analytical.py analysis/bytecounts.py analysis/parselogs.py analysis/plotdats.py docker/
 echo "deflogin off" > docker/.screenrc
 cd docker && docker build -t walkingonions .