forked from mushorg/glastopf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (30 loc) · 1.77 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
FROM ubuntu:trusty
MAINTAINER Lukas Rist <[email protected]>
## setup APT
RUN sed -i '1ideb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse' /etc/apt/sources.list
RUN sed -i '1ideb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse' /etc/apt/sources.list
RUN sed -i '1ideb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse' /etc/apt/sources.list
RUN sed -i '1ideb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse' /etc/apt/sources.list
RUN apt-get update
ENV DEBIAN_FRONTEND noninteractive
## Install dependencies
RUN apt-get install -y python2.7 python-openssl python-gevent libevent-dev python2.7-dev build-essential make
RUN apt-get install -y python-chardet python-requests python-sqlalchemy python-lxml
RUN apt-get install -y python-beautifulsoup mongodb python-pip python-dev python-setuptools
RUN apt-get install -y g++ git php5 php5-dev liblapack-dev gfortran libmysqlclient-dev
RUN apt-get install -y libxml2-dev libxslt-dev
RUN pip install --upgrade distribute
## Install and configure the PHP sandbox
RUN git clone git://github.com/glastopf/BFR.git /opt/BFR
RUN cd /opt/BFR && phpize && ./configure --enable-bfr && make && sudo make install
RUN for i in $(find / -type f -name php.ini); do sed -i "/[PHP]/azend_extension=$(find /usr/lib/php5 -type f -name bfr.so)" $i; done
## Install glastopf from latest sources
RUN git clone https://github.com/glastopf/glastopf.git /opt/glastopf
RUN cd /opt/glastopf && python setup.py install
## Configuration
RUN mkdir /opt/myhoneypot
# Clean up when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 80
WORKDIR /opt/myhoneypot
CMD ["glastopf-runner"]