Cron and Crontab files not executed in Docker

后端 未结 1 405
悲&欢浪女
悲&欢浪女 2021-02-09 02:43

I have this simple Dockerfile for testing, but this is also same in my LEMP stack in a PHP image: cron jobs simply not being executed in Docker.

This is my testing Docke

相关标签:
1条回答
  • 2021-02-09 03:26

    Cron (at least in Debian) does not execute crontabs with more than 1 hardlink, see bug 647193. As Docker uses overlays, it results with more than one link to the file, so you have to touch it in your startup script, so the link is severed:

    touch /etc/crontab /etc/cron.*/*
    
    0 讨论(0)
提交回复
热议问题