Implemented new solution to get cron work in container
This commit is contained in:
parent
bf3e9d4080
commit
9cd4ed73f2
@ -12,6 +12,8 @@ services:
|
||||
- "ocsreportsdata:/usr/share/ocsinventory-reports/ocsreports/extensions"
|
||||
- "varlibdata:/var/lib/ocsinventory-reports"
|
||||
- "httpdconfdata:/etc/apache2/conf-available"
|
||||
# make use of cron with crontab inside of container by mounting the specified file
|
||||
# - "./crontab:/etc/cron/docker-crontab"
|
||||
environment:
|
||||
OCS_DB_SERVER: ocsinventory-db
|
||||
OCS_DB_USER: ocsuser
|
||||
|
||||
8
2.11/docker-entrypoint.d/40-crontab.sh
Normal file
8
2.11/docker-entrypoint.d/40-crontab.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
CRONTAB_FILE="/etc/cron/docker-crontab"
|
||||
|
||||
if [ -f $CRONTAB_FILE ]; then
|
||||
crontab $CRONTAB_FILE
|
||||
cron -n
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user