'How can I set the crond for docker? [duplicate]
I installed cron and
FROM python:3.9.5
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y netcat && apt-get install -y ftp && apt-get install -y cron
log in the docker image
root@ip-172-31-12-132:/usr/src/app# which ftp
/usr/bin/ftp
root@ip-172-31-12-132:/usr/src/app# ps -aef | grep cron
root 1386 764 0 02:15 pts/1 00:00:00 grep cron
no cron is running
root@ip-172-31-12-132:/usr/src/app# crontab -l
no crontab for root
I guess I have to do something to start cron server.
root@ip-172-31-12-132:/usr/src/app# service crond start
crond: unrecognized service
root@ip-172-31-12-132:/usr/src/app# /etc/init.d/crond start
bash: /etc/init.d/crond: No such file or directory
How can I do this??
Solution 1:[1]
Try :
apt-get install cron
and then run
/usr/sbin/cron
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
