Skip to content
Snippets Groups Projects
Commit 2f63c9d2 authored by nimrod's avatar nimrod
Browse files

Add Cron container for backing up the slapd data.

parent ea1dc017
No related branches found
No related tags found
No related merge requests found
*
!crontab
FROM docker:19.03 as docker
# hadolint ignore=DL3006
FROM adarnimrod/cron as supersonic
COPY --from=docker /usr/local/bin/docker /usr/local/bin/
COPY --chown=root:root crontab /crontab
# hadolint ignore=DL3002
USER root
# crond
> Cron container image.
## Description
This container periodically runs the slapd backup script. The script runs in the
slapd container 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: <https://www.shore.co.il/git/>.
@daily docker exec ldap_ldap_1 backup
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
--- ---
version: '3.5' version: '3.5'
services: services:
crond:
build:
context: crond/
volumes:
- /run/docker.sock:/run/docker.sock
ldap: ldap:
build: build:
cache_from: cache_from:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment