1
2
3
4
5
6
7
version: "3.3"

services:
cron:
restart: always
image: alpine
command: crond -f

很简单,其实就是要把 cron 服务放到前台来运行,不然会容器运行完会退出