forked from codexgigassys/codex-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
68 lines (67 loc) · 2.19 KB
/
Dockerfile
File metadata and controls
68 lines (67 loc) · 2.19 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM python:2.7
RUN apt-get clean && apt-get update -qq && apt-get install -y build-essential \
libpq-dev \
python-hachoir-metadata \
p7zip-full \
libffi-dev \
libssl-dev \
python-dev \
libfuzzy-dev \
python-numpy \
python-scipy \
python-matplotlib \
python-gevent \
python-pip \
python-magic \
python-crypto \
zip \
python-dateutil \
python-mysqldb \
redis-server \
autoconf \
openssl \
file \
python \
git \
autoconf \
automake \
libc-dev \
libtool \
python-dev \
unzip \
libfreetype6-dev \
libtaoframework-freetype-cil-dev \
libxft-dev
RUN mkdir /myapp
WORKDIR /myapp
ADD . /myapp
#ToDo: fix secrets.py add with an if
ADD yara/yara.zip* /tmp/
#echo a is necessary so the line returns 0 in case the file already exists.
RUN bash -c "wget -nc https://github.com/plusvic/yara/archive/v3.4.0.zip -O /tmp/yara.zip; echo a"
RUN unzip /tmp/yara.zip -d /tmp && \
pip install -r /myapp/src/pip_requeriments.txt && \
pip install -r /myapp/src/pip_yargen_requeriments.txt && \
pip install -r /myapp/src/pip_vt_api_requeriments.txt && \
cd /tmp/yara-3.4.0/ && ./bootstrap.sh && ./configure && \
cd /tmp/yara-3.4.0/ && make && make install && \
cd /myapp/yara && \
python /myapp/yara/binarly-sdk/setup.py install && \
cd /myapp/yara/yarGen-master && \
7z x -y good-strings.db.zip.001 -o/myapp/yara/yarGen-master && \
7z x -y good-opcodes.db.zip.001 -o/myapp/yara/yarGen-master
ADD yara/pestudio.zip* /tmp/
RUN bash -c "wget -nc https://winitor.com/tools/pestudio/current/pestudio.zip -O /tmp/pestudio.zip; echo a" && \
unzip /tmp/pestudio.zip -d /tmp && \
cp /tmp/pestudio/xml/strings.xml /myapp/yara/yarGen-master/
#yargen
#RUN chmod +x /myapp/yara/setupYarGen.sh && sleep 1 && cat /myapp/yara/setupYarGen.sh
#RUN ["/myapp/yara/setupYarGen.sh"]
#ADD yara/yarGen-master.zip* /tmp/
#RUN bash -c "wget -nc https://github.com/Neo23x0/yarGen/archive/master.zip -O /tmp/yarGen-master.zip; echo a"
#RUN unzip /tmp/yarGen-master.zip -d /tmp
#RUN if [ $(ls /myapp/yara/yarGen-master/) ]; then echo "yarGen-master folder already exists"; else mv /tmp/yarGen-master/ /myapp/yara/; fi
ENV REQUESTS_CA_BUNDLE "/usr/local/lib/python2.7/site-packages/certifi/weak.pem"
#RUN cd /myapp/yara && python ./
#CMD ["python","/myapp/src/api2.py"]
#CMD ["/bin/bash"]