-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
45 lines (39 loc) · 1.21 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
40
41
42
43
44
45
FROM malice/alpine
LABEL maintainer "https://github.com/blacktop"
LABEL malice.plugin.repository = "https://github.com/malice-plugins/pdf.git"
LABEL malice.plugin.category="pdf"
LABEL malice.plugin.mime="application/pdf"
LABEL malice.plugin.docker.engine="*"
ENV PDFID 0_2_4
ENV PDF_PARSER 0_6_8
COPY . /usr/sbin
RUN apk --update add --no-cache python py-setuptools
RUN apk --update add --no-cache -t .build-deps \
openssl-dev \
build-base \
python-dev \
libffi-dev \
musl-dev \
libc-dev \
py-pip \
gcc \
git \
&& set -ex \
&& echo "===> Install malice/pdf plugin..." \
&& cd /usr/sbin \
&& export PIP_NO_CACHE_DIR=off \
&& export PIP_DISABLE_PIP_VERSION_CHECK=on \
&& pip install --upgrade pip wheel \
&& echo "\t[*] install requirements..." \
&& pip install -U -r requirements.txt \
# && echo "\t[*] install peepdf..." \
# && pip install https://github.com/jbremer/peepdf.git \
&& echo "\t[*] install pdfscan.py..." \
&& chmod +x pdfscan.py \
&& ln -s /usr/sbin/pdfscan.py /usr/sbin/pdfscan \
&& echo "\t[*] clean up..." \
&& rm requirements.txt Dockerfile \
&& apk del --purge .build-deps
WORKDIR /malware
ENTRYPOINT ["su-exec","malice","/sbin/tini","--","pdfscan"]
CMD ["--help"]