prep mailoney for rebuild

This commit is contained in:
t3chn0m4g3 2021-09-20 20:20:04 +00:00
parent 32e1e8a8ea
commit 8576e576a6
2 changed files with 25 additions and 21 deletions

View file

@ -1,16 +1,17 @@
FROM alpine:3.11
FROM debian:buster-slim
#
# Install packages
RUN apk -U --no-cache add \
RUN apt-get update -y && \
apt-get install -y \
autoconf \
automake \
build-base \
build-essential \
git \
libcap \
libcap2-bin \
libtool \
py-pip \
python \
python-dev && \
python2 \
python2-dev \
python-pip && \
#
# Install libemu
git clone https://github.com/buffer/libemu /root/libemu/ && \
@ -32,23 +33,26 @@ RUN apk -U --no-cache add \
git checkout 85c37649a99e1cec3f8d48d509653c9a8127ea4f && \
#
# Setup user, groups and configs
addgroup -g 2000 mailoney && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 mailoney && \
addgroup --gid 2000 mailoney && \
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 mailoney && \
chown -R mailoney:mailoney /opt/mailoney && \
setcap cap_net_bind_service=+ep /usr/bin/python2.7 && \
#
# Clean up
apk del --purge autoconf \
apt-get purge -y \
autoconf \
automake \
build-base \
build-essential \
git \
py-pip \
python-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
libtool \
python2-dev \
python-pip && \
apt-get autoremove --purge -y && \
apt-get clean && \
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
#
# Set workdir and start mailoney
STOPSIGNAL SIGINT
USER mailoney:mailoney
WORKDIR /opt/mailoney/
CMD ["/usr/bin/python","mailoney.py","-i","0.0.0.0","-p","25","-s","mailrelay.local","-t","schizo_open_relay"]
CMD ["/usr/bin/python2","mailoney.py","-i","0.0.0.0","-p","25","-s","mailrelay.local","-t","schizo_open_relay"]

View file

@ -20,7 +20,7 @@ services:
- mailoney_local
ports:
- "25:25"
image: "ghcr.io/telekom-security/mailoney:2006"
image: "dtagdevsec/mailoney:2006"
read_only: true
volumes:
- /data/mailoney/log:/opt/mailoney/logs