Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Commit

Permalink
Update Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudiuGeorgiu committed May 22, 2020
1 parent 7860fc1 commit 75cbc4e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/general_question.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ""
<!--
Thank you for your interest in Obfuscapk.
You can use this issue for anything other than bug reports and feature requests. Please provide as much information as needed to help us answer your question(s).
You can use this issue for anything other than bug reports and feature requests. Please provide as much information as needed to help us answer your question(s). Please make sure to also check the FAQ at https://github.com/ClaudiuGeorgiu/Obfuscapk/blob/master/FAQ.md as you may find an answer for the most common questions.
NOTE:
* if you're including code snippets/logs, please format them properly (see https://help.github.com/github/writing-on-github/basic-writing-and-formatting-syntax#quoting-code);
Expand Down
28 changes: 15 additions & 13 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
FROM python:3.7.6-slim-stretch
FROM python:3.8.3-slim-buster

ENV APKTOOL_VERSION="2.4.1"
ENV ANDROID_HOME="/android-sdk-linux"
ENV BUILD_TOOLS_VERSION="29.0.2"
ENV BUILD_TOOLS_VERSION="29.0.3"
ENV PATH="${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/build-tools/${BUILD_TOOLS_VERSION}"

# Install the needed tools.
RUN bash -c 'for i in {1..8}; do mkdir -p "/usr/share/man/man$i"; done' && \
# Java 8 (needed for apktool and jarsigner).
apt update && apt install --no-install-recommends -y openjdk-8-jdk-headless wget unzip && \
# Java JDK (needed for apktool and jarsigner).
apt update && apt install --no-install-recommends -y openjdk-11-jdk-headless wget unzip && \
# Android SDK (needed for zipalign).
mkdir -p "${ANDROID_HOME}" && \
wget -q "https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" && \
unzip -q sdk-tools-linux-4333796.zip -d "${ANDROID_HOME}" && \
rm sdk-tools-linux-4333796.zip && \
yes | sdkmanager "build-tools;${BUILD_TOOLS_VERSION}" && \
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip" -O android-sdk.zip && \
unzip -q android-sdk.zip -d "${ANDROID_HOME}" && rm android-sdk.zip && \
yes | sdkmanager --sdk_root="${ANDROID_HOME}" "build-tools;${BUILD_TOOLS_VERSION}" && \
# Apktool.
wget -q "https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool" \
-O /usr/local/bin/apktool && chmod a+x /usr/local/bin/apktool && \
Expand All @@ -24,16 +23,19 @@ RUN bash -c 'for i in {1..8}; do mkdir -p "/usr/share/man/man$i"; done' && \
apt remove --purge -y wget unzip && \
apt autoremove --purge -y && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Copy the source code.
COPY . /Obfuscapk
# Copy requirements and install.
COPY ./requirements.txt /Obfuscapk/
RUN python3 -m pip install --no-cache-dir -r /Obfuscapk/requirements.txt

# Install Python requirements.
RUN python3.7 -m pip install --no-cache-dir -r /Obfuscapk/requirements.txt
# Copy the needed files.
COPY ./obfuscapk/ /Obfuscapk/obfuscapk/

# Set the working directory (to be used when mounting files from the host).
WORKDIR /workdir
VOLUME /workidr

# Set the entrypoint to Obfuscapk command line interface.
ENV PYTHONPATH="/Obfuscapk"
ENTRYPOINT ["python3.7", "-m", "obfuscapk.cli"]

# Run with -u $(id -u):$(id -g) to avoid file permission issues.
ENTRYPOINT ["python3", "-m", "obfuscapk.cli"]
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pycryptodome==3.9.7
pytest-cov==2.8.1
tqdm==4.45.0
tqdm==4.46.0
virustotal-api==1.1.11
Yapsy==1.12.2

0 comments on commit 75cbc4e

Please sign in to comment.