docker-save-attachments/Dockerfile

25 lines
713 B
Docker
Raw Normal View History

2015-07-31 01:51:11 +00:00
FROM ubuntu:latest
MAINTAINER Ding Corporation
2015-07-31 03:44:00 +00:00
VOLUME /var/mail /config /output
2015-07-31 05:01:41 +00:00
ADD save-attachments.crontab /etc/cron.d/save-attachments
ADD save-attachments.sh /opt/save-attachments.sh
2015-07-31 01:51:11 +00:00
# install packages
RUN apt-get update \
&& apt-get install -y fetchmail maildrop mpack \
&& apt-get clean && rm -fr /var/lib/apt/lists/*
RUN maildirmake /var/mail/working \
2015-07-31 04:31:14 +00:00
&& mkdir /var/mail/working/landing \
&& mkdir /var/mail/working/extracted \
2015-07-31 05:01:41 +00:00
&& echo "to /var/mail/working" > /root/.mailfilter \
&& touch /var/mail/save-attachments.log \
&& chmod 0644 /etc/cron.d/save-attachments
2015-07-31 01:51:11 +00:00
ADD docker-entrypoint.sh /opt/docker-entrypoint.sh
ENTRYPOINT ["/opt/docker-entrypoint.sh"]
2015-07-31 05:01:41 +00:00
CMD ["cron"]