From ca198aaef81f5f403027ada02dc318cafbadd1da Mon Sep 17 00:00:00 2001 From: BBerastegui Date: Mon, 12 Feb 2018 15:48:15 +0100 Subject: [PATCH] Re-adapted the docker to the develop branch --- README.md | 2 +- docker/Dockerfile | 16 +++++++++++++++- docker/stacoan.sh | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 16be55e..14465a9 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ __Linux__ `docker build . -t stacoan` -`docker run -p 8000:8000 -v /yourappsfolder:/tmp -i -t stacoan /tmp/com.myapk.apk` +`docker run -e JAVA_OPTS="-Xms2048m -Xmx2048m" -p 8000:8000 -v /yourappsfolder:/tmp -i -t stacoan /tmp/com.myapk.apk` Wait for it to be analysed and the open your browser in http://localhost:8000 diff --git a/docker/Dockerfile b/docker/Dockerfile index df28dc2..47325bf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,20 @@ FROM python:3 -RUN apt-get update && apt-get install upx -y +RUN apt-get update && apt-get install upx software-properties-common -y + +# https://github.com/re6exp/debian-jessie-oracle-jdk-8 +RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ + echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 && \ + apt-get update + +RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ + echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default + +RUN rm -rf /var/cache/oracle-jdk8-installer && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* RUN git clone https://github.com/vincentcox/StaCoAn/ WORKDIR /StaCoAn/src diff --git a/docker/stacoan.sh b/docker/stacoan.sh index b6ffffd..43f6283 100644 --- a/docker/stacoan.sh +++ b/docker/stacoan.sh @@ -7,7 +7,7 @@ if [ $# -eq 0 ]; then exit 1 fi -python /StaCoAn/src/main.py $@ +python /StaCoAn/src/stacoan.py $@ # https://stackoverflow.com/questions/90418/exit-shell-script-based-on-process-exit-code rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi