tpotce/docker/mailoney/Dockerfile

29 lines
805 B
Text
Raw Normal View History

FROM alpine:3.15
2019-08-28 14:41:35 +00:00
#
# Install packages
2021-09-23 21:50:37 +00:00
RUN apk -U --no-cache add \
2018-03-25 18:35:32 +00:00
git \
2021-09-23 21:50:37 +00:00
libcap \
python2 && \
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 && \
2019-08-28 14:41:35 +00:00
#
# Setup user, groups and configs
2021-09-23 21:50:37 +00:00
addgroup -g 2000 mailoney && \
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
apk del --purge git && \
2021-09-23 21:50:37 +00:00
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/
2021-09-23 21:50:37 +00:00
CMD ["/usr/bin/python","mailoney.py","-i","0.0.0.0","-p","25","-s","mailrelay.local","-t","schizo_open_relay"]