forked from rednaga/APKiD
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
39 lines (30 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3-slim
LABEL maintainer="RedNaga <[email protected]>"
RUN groupadd -g 999 appuser && \
useradd -r -u 999 -g appuser appuser
RUN apt-get update -qq && \
apt-get install -y git build-essential gcc pandoc curl
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip wheel --quiet --no-cache-dir --wheel-dir=/tmp/yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/[email protected] && \
pip install --quiet --no-cache-dir --no-index --find-links=/tmp/yara-python yara-python && \
rm -rf /tmp/yara-python
WORKDIR /apkid
COPY . .
RUN python prep-release.py && \
pip install -e .
# Place to bind a mount point to for scratch pad work
RUN mkdir /input
WORKDIR /input
# Cleanup
RUN apt remove --purge -y \
git \
man \
gcc && \
apt clean && \
apt autoclean && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /usr/share/doc/* /usr/share/man/* > /dev/null 2>&1
RUN chown -R appuser:appuser /apkid && \
chown -R appuser:appuser /input
USER appuser
ENTRYPOINT ["apkid"]