2017-10-13 18:58:14 +00:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
# 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 \
|
2018-05-23 07:58:01 +00:00
|
|
|
libcap \
|
2018-03-25 18:35:32 +00:00
|
|
|
libtool \
|
|
|
|
py-pip \
|
|
|
|
python \
|
|
|
|
python-dev && \
|
2017-10-13 18:58:14 +00:00
|
|
|
|
|
|
|
# Install libemu
|
2018-05-19 19:43:02 +00:00
|
|
|
git clone --depth=1 https://github.com/buffer/libemu /root/libemu/ && \
|
2017-10-13 18:58:14 +00:00
|
|
|
cd /root/libemu/ && \
|
|
|
|
autoreconf -vi && \
|
|
|
|
./configure && \
|
|
|
|
make && \
|
|
|
|
make install && \
|
|
|
|
|
|
|
|
# Install libemu python wrapper
|
2018-05-19 19:43:02 +00:00
|
|
|
pip install --no-cache-dir --upgrade pip && \
|
|
|
|
pip install --no-cache-dir pylibemu && \
|
2017-10-13 18:58:14 +00:00
|
|
|
|
|
|
|
# Install mailoney from git
|
2018-05-19 19:43:02 +00:00
|
|
|
git clone --depth=1 https://github.com/awhitehatter/mailoney /opt/mailoney && \
|
2017-10-13 18:58:14 +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 && \
|
2017-10-13 18:58:14 +00:00
|
|
|
chown -R mailoney:mailoney /opt/mailoney && \
|
2018-05-23 07:58:01 +00:00
|
|
|
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
|
2017-10-13 18:58:14 +00:00
|
|
|
|
|
|
|
# Clean up
|
2018-05-19 19:43:02 +00:00
|
|
|
apk del --purge autoconf \
|
|
|
|
automake \
|
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
py-pip \
|
|
|
|
python-dev && \
|
2017-10-13 18:58:14 +00:00
|
|
|
rm -rf /root/* && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
# Set workdir and start glastopf
|
2018-03-31 21:44:11 +00:00
|
|
|
USER mailoney:mailoney
|
2017-10-13 18:58:14 +00:00
|
|
|
WORKDIR /opt/mailoney/
|
2018-05-23 07:58:01 +00:00
|
|
|
CMD ["/usr/bin/python","mailoney.py","-i","0.0.0.0","-p","25","-s","mailserver","-t","schizo_open_relay"]
|