-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server optimisations and docker smaller (#50)
* Optimalisations in server and searchcode * Reduce docker image size (#47) This reduces the image size from 1.44GB to 264MB. This is a decrease of more than 80%. We achieve this by using Alpine Linux with JDK 8 as our base image. * Explicitly use python3 (#49) * Fix for #46
- Loading branch information
1 parent
3750b2f
commit aa9b8e4
Showing
9 changed files
with
98 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
FROM python:3 | ||
# ----------------------------------------------------------------------------------------- | ||
# Start from Alpine OS with Oracle JDK8 | ||
# ----------------------------------------------------------------------------------------- | ||
|
||
RUN apt-get update && apt-get install upx software-properties-common -y | ||
FROM anapsix/alpine-java | ||
|
||
# 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 | ||
# ----------------------------------------------------------------------------------------- | ||
# Install Python3 | ||
# ----------------------------------------------------------------------------------------- | ||
|
||
RUN rm -rf /var/cache/oracle-jdk8-installer && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN apk add --no-cache python3 | ||
RUN python3 -m ensurepip | ||
RUN rm -r /usr/lib/python*/ensurepip | ||
RUN pip3 install --upgrade pip setuptools | ||
RUN if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi | ||
RUN if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi | ||
RUN rm -r /root/.cache | ||
|
||
|
||
# ----------------------------------------------------------------------------------------- | ||
# Install StaCoAn | ||
# ----------------------------------------------------------------------------------------- | ||
|
||
RUN apk add --no-cache git | ||
RUN git clone https://github.com/vincentcox/StaCoAn/ | ||
WORKDIR /StaCoAn/src | ||
RUN pip3 install -r requirements.txt && chmod u+rwx /StaCoAn/src/jadx/bin/jadx | ||
|
||
COPY stacoan.sh /stacoan.sh | ||
|
||
|
||
# ----------------------------------------------------------------------------------------- | ||
# Expose us | ||
# ----------------------------------------------------------------------------------------- | ||
|
||
EXPOSE 8000 | ||
EXPOSE 8080 | ||
ENTRYPOINT ["/bin/bash", "/stacoan.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
http:|||"res","layout"||| Suggested by Adi | ||
(https|http):\/\/.*api.*|||"res","layout"||| Suggested by Adi | ||
(https|http):\/\/.*api.*|||"res","layout"||| Suggested by Adi | ||
http:\/\/schemas\.android\.com\/apk\/res\/android|||||| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters