Docker: include cron

Created on 16 Feb 2020  路  6Comments  路  Source: nextcloud/docker

Sry if i麓m wrong but i think crontab should be installed by default in image becouse its an funktion from nextcloud.

image

And in the info Text stand that cron is recommend and i cant use it

yes i can write my own dockerfile (wich is possible when using dockker compose but didnt when using unraid or some other management tools from docker).

another and better way do do this is to include env in docer files where i can install packages when starting the container. for example this repo is using this and i love it (look into dockerfile): https://github.com/fhem/fhem-docker
image

by the way i麓m using nextcloud:18.0.1-apache

question

Most helpful comment

Cron is already installed in the container (#220), but the containers are built to run a single process. The cron example just shows how to alter the image to run cron as 2nd process in a single container using supervisord.

However running 2 processes in one container adds complexity, so an alternate solution is running cron in another container like here:

https://github.com/nextcloud/docker/blob/430ce875c237bfe3759c0547669d3bbebedd7310/stack.yml#L29-L36

All 6 comments

we really need cron for external sync

Cron is already installed in the container (#220), but the containers are built to run a single process. The cron example just shows how to alter the image to run cron as 2nd process in a single container using supervisord.

However running 2 processes in one container adds complexity, so an alternate solution is running cron in another container like here:

https://github.com/nextcloud/docker/blob/430ce875c237bfe3759c0547669d3bbebedd7310/stack.yml#L29-L36

Sorry if this is the wrong spot to ask, but is it expected for to keep seeing the crontab hasn't run error under settings when using a second nextcloud container to handle cron? Does it matter which cron setting in the gui the nextcloud app container is set to?

Cron should be mentioned in docker compose, which is also provided in examples ;)

Sorry if this is the wrong spot to ask, but is it expected for to keep seeing the crontab hasn't run error under settings when using a second nextcloud container to handle cron? Does it matter which cron setting in the gui the nextcloud app container is set to?

It's not, you did something wrong

More examples can be found in #627

Was this page helpful?
0 / 5 - 0 ratings

Related issues

waldner picture waldner  路  3Comments

ghost picture ghost  路  3Comments

tanja84dk picture tanja84dk  路  3Comments

raimund-schluessler picture raimund-schluessler  路  3Comments

vancky picture vancky  路  3Comments