Answer the question
In order to leave comments, you need to log in
How to run tasks inside a docker container?
Tell me how you can get around Docker's restriction on the work of cron?
You need to run a number of background tasks inside the container
It is said that running the cron daemon directly inside the container is not very recommended
Now I run cron from the host system */25 * * * * docker exec -i -t www /script/cron_job sync
Maybe there are more beautiful options like this do ?
Answer the question
In order to leave comments, you need to log in
Any application can be in only two states: it either solves the task assigned to it or not. But that's it, a bit of theory.
In your particular case, there is no better option.
If you need to make sure that there is your task in cron on the host machine, then you need chef or ansible
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question