2015-11-25 03:42:37 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for cowrie
|
|
|
|
#
|
|
|
|
|
2015-07-21 18:10:52 +02:00
|
|
|
FROM alpine
|
2016-05-01 03:06:20 +02:00
|
|
|
MAINTAINER kev <noreply@easypi.info>
|
2015-07-21 18:10:52 +02:00
|
|
|
|
2015-11-25 03:42:37 +02:00
|
|
|
RUN apk add -U build-base \
|
|
|
|
libffi \
|
2015-11-25 02:33:20 +02:00
|
|
|
libffi-dev \
|
2015-11-25 03:42:37 +02:00
|
|
|
openssl \
|
2015-11-25 02:33:20 +02:00
|
|
|
openssl-dev \
|
2015-11-25 03:42:37 +02:00
|
|
|
python \
|
|
|
|
python-dev \
|
|
|
|
tar \
|
|
|
|
&& wget -qO- https://bootstrap.pypa.io/get-pip.py | python \
|
|
|
|
&& pip install pyasn1 \
|
|
|
|
pyOpenSSL \
|
|
|
|
service_identity \
|
|
|
|
twisted \
|
2015-07-21 18:10:52 +02:00
|
|
|
&& adduser -D cowrie \
|
|
|
|
&& cd /home/cowrie \
|
2015-11-25 03:42:37 +02:00
|
|
|
&& wget -qO- https://github.com/micheloosterhof/cowrie/archive/master.tar.gz | tar xz --strip 1 \
|
2015-07-21 18:10:52 +02:00
|
|
|
&& mv cowrie.cfg.dist cowrie.cfg \
|
|
|
|
&& chown -R cowrie:cowrie . \
|
2015-11-25 03:42:37 +02:00
|
|
|
&& apk del build-base \
|
|
|
|
libffi-dev \
|
|
|
|
openssl-dev \
|
|
|
|
python-dev \
|
2015-07-21 18:10:52 +02:00
|
|
|
tar \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
2015-11-25 02:33:20 +02:00
|
|
|
|
2015-07-21 18:10:52 +02:00
|
|
|
EXPOSE 2222
|
|
|
|
|
|
|
|
USER cowrie
|
|
|
|
WORKDIR /home/cowrie
|
|
|
|
|
|
|
|
CMD ["twistd", "-n", "-l", "log/cowrie.log", "cowrie"]
|