Commit 7831efb0 authored by ale's avatar ale
Browse files

Add a Dockerfile

parent 34e4f76b
FROM debian:buster AS build
RUN apt-get -q update && \
env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 python3-setuptools python3-wheel
COPY setup.* /src/
COPY nospam/ /src/nospam/
WORKDIR /src
RUN python3 setup.py bdist_wheel
FROM debian:buster
COPY --from=build /src/dist/nospam*.whl /tmp/
RUN apt-get -q update && \
env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl crm114 python3 python3-setuptools python3-pip \
python3-gevent python3-googleapi python3-yaml && \
pip3 install /tmp/nospam*.whl && \
rm -fr /var/lib/apt/lists/* && rm -f /tmp/*.whl
COPY nospam/conf/update-surbl /usr/bin/update-surbl
COPY nospam/conf/docker-start.sh /usr/bin/nospamd
ENTRYPOINT ["/usr/bin/nospamd"]
#!/bin/sh
dir=${NOSPAM_SURBL_DIR:-/var/lib/nospam}
test -d ${dir} || mkdir -p ${dir}
if [ ! -e ${dir}/two-level-tlds ]; then
/usr/bin/update-surbl
fi
exec /usr/local/bin/nospamd "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment