diff --git a/crond/.dockerignore b/crond/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..780ece0ba38bebbc9981d893ff31ffc6cb6815e2 --- /dev/null +++ b/crond/.dockerignore @@ -0,0 +1,2 @@ +* +!crontab diff --git a/crond/Dockerfile b/crond/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a2b6b3ab84171d9d84df5cd9f64afb608d4ec367 --- /dev/null +++ b/crond/Dockerfile @@ -0,0 +1,6 @@ +FROM docker:18.09 as docker + +FROM adarnimrod/cron as supersonic +COPY --from=docker /usr/local/bin/docker /usr/local/bin/ +COPY --chown=root:root crontab /crontab +USER root diff --git a/crond/README.md b/crond/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8731172b30241d264d62a6bc0eb2f6c0728f0293 --- /dev/null +++ b/crond/README.md @@ -0,0 +1,22 @@ +# crond + +> Cron container image. + +## Description + +This container runs Cron jobs for training SpamAssassin's Bayesian classifier +and for updating ClamAV's virus database. The jobs run in the other containers, +so the `dockerd` socket is bind mounted to this container and the commands are +executed via `docker exec` in the other containers. Thus, outside of the context +of this setup this container doesn't make much sense. + +## License + +This software is licensed under the MIT license (see `LICENSE.txt`). + +## Author Information + +Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( +https://www.shore.co.il/). Patches are welcome via [`git send-email`]( +http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located +at: . diff --git a/crond/crontab b/crond/crontab new file mode 100644 index 0000000000000000000000000000000000000000..4ed5df72d3db0396d9b98b5828b0433fc8b49396 --- /dev/null +++ b/crond/crontab @@ -0,0 +1,2 @@ +@daily docker exec mail_clamd_1 clamd-update +@daily docker exec mail_spamd_1 spamd-learn