1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-14 11:23:02 +02:00
dockerfiles/cowrie/Dockerfile

39 lines
1.0 KiB
Docker
Raw Normal View History

2015-11-25 03:42:37 +02:00
#
# Dockerfile for cowrie
#
2015-07-21 18:10:52 +02:00
FROM alpine
2017-05-08 01:05:07 +02:00
MAINTAINER kev <noreply@easypi.pro>
2015-07-21 18:10:52 +02:00
2017-11-05 15:06:52 +02:00
RUN apk add -U bash \
build-base \
ca-certificates \
2015-11-25 03:42:37 +02:00
libffi \
libffi-dev \
2015-11-25 03:42:37 +02:00
openssl \
openssl-dev \
2015-11-25 03:42:37 +02:00
python \
python-dev \
tar \
&& wget -qO- https://bootstrap.pypa.io/get-pip.py | python \
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 \
2017-11-05 15:06:52 +02:00
&& pip install -r requirements.txt \
&& sed '/Enable Telnet/{n;s/\(enabled\).*/\1 = true/}' cowrie.cfg.dist > cowrie.cfg \
&& sed -i 's/^\(VIRTUALENV_ENABLED\).*/\1=no/' bin/cowrie \
2015-07-21 18:10:52 +02:00
&& 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/*
2017-11-05 15:06:52 +02:00
EXPOSE 2222 2223
2015-07-21 18:10:52 +02:00
USER cowrie
WORKDIR /home/cowrie
2017-11-05 15:06:52 +02:00
CMD ["bin/cowrie", "start", "-n"]