OCSInventory-Docker-Image
OCSInventory-Docker-Image copied to clipboard
software inventory empty in 2.9 image
Hi.
By default software inventory is empty. For solve this issue need add crontab in image and add task. For example : Dockerfile
RUN yum ${YUM_FLAGS} install wget
curl
*crontabs *
yum-utils
tar \
add line in Dockerfile
COPY ocs-inventory-cron /etc/cron.d/ocs-inventory-cron RUN chmod 0644 /etc/cron.d/ocs-inventory-cron RUN crontab /etc/cron.d/ocs-inventory-cron RUN touch /var/log/cron.log CMD cron && tail -f /var/log/cron.log
file ocs-inventory-cron 0 23 * * * cd /usr/share/ocsinventory-reports/ocsreports/crontab && php73 cron_all_software.php
@babaymaster thanks for reporting.
@gillesdubois I reproduced this issue and I'm working in a solution.
Any update on this issue? I'm running ocsinventory/ocsinventory-docker-image:2.10 image, and cron support completely missing from image, and also OCSReports cron files also not running on a schedule. "All Software" list always empty...
I closed the PR because the base image is no longer based on centos.
As a workaround, you could configure a crontab directly in your server that runs docker and execute:
0 0 * * * root docker exec <your_container_name> bash -c 'cd /usr/share/ocsinventory-reports/ocsreports/crontab && php cron_all_software.php'
@wiltonsr Thank you for your quick help! I implement this, I didn't think outside of the container until now... :-)
Hi,
We'll implement a note in the wiki in order to implement crontab for the docker instance :)
Regards, Gilles.