tpotce/docker/mailoney/Dockerfile

55 lines
1.5 KiB
Text
Raw Normal View History

FROM alpine:3.11
2019-08-28 14:41:35 +00:00
#
# Install packages
2018-05-19 19:43:02 +00:00
RUN apk -U --no-cache add \
autoconf \
2018-03-25 18:35:32 +00:00
automake \
build-base \
git \
libcap \
2018-03-25 18:35:32 +00:00
libtool \
py-pip \
python \
python-dev && \
2019-08-28 14:41:35 +00:00
#
# Install libemu
2020-09-04 12:37:28 +00:00
git clone https://github.com/buffer/libemu /root/libemu/ && \
cd /root/libemu/ && \
2020-09-04 12:37:28 +00:00
git checkout e2624361e13588da74a2ce3e1dea0abb59dcf1d0 && \
autoreconf -vi && \
./configure && \
make && \
make install && \
2019-08-28 14:41:35 +00:00
#
# Install libemu python wrapper
2018-05-30 11:20:55 +00:00
pip install --no-cache-dir \
hpfeeds \
pylibemu && \
2019-08-28 14:41:35 +00:00
#
# Install mailoney from git
2020-09-04 12:37:28 +00:00
git clone https://github.com/t3chn0m4g3/mailoney /opt/mailoney && \
cd /opt/mailoney && \
git checkout 85c37649a99e1cec3f8d48d509653c9a8127ea4f && \
2019-08-28 14:41:35 +00:00
#
# Setup user, groups and configs
addgroup -g 2000 mailoney && \
2018-05-19 19:43:02 +00:00
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 mailoney && \
chown -R mailoney:mailoney /opt/mailoney && \
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
2019-08-28 14:41:35 +00:00
#
# Clean up
2018-05-19 19:43:02 +00:00
apk del --purge autoconf \
automake \
build-base \
git \
py-pip \
python-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
2019-08-28 14:41:35 +00:00
#
2018-05-30 11:20:55 +00:00
# Set workdir and start mailoney
2018-09-11 12:19:26 +00:00
STOPSIGNAL SIGINT
2018-03-31 21:44:11 +00:00
USER mailoney:mailoney
WORKDIR /opt/mailoney/
2018-05-30 11:20:55 +00:00
CMD ["/usr/bin/python","mailoney.py","-i","0.0.0.0","-p","25","-s","mailrelay.local","-t","schizo_open_relay"]