首页 > 解决方案 > Crond 错误 - 无法设置组:不允许操作

问题描述

我正在尝试在我的 Docker 映像上设置 Laravel 调度程序。

在我的末尾,我.Dockerfile添加了以下内容;

COPY ./mod-docker/crontab /etc/crontabs/root

CMD ["crond", "-f", "-d", "8"]

在我的crontab文件中,我有这个;

* * * * * cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1

但现在在构建时,我得到以下输出;

app_1      | crond: can't set groups: Operation not permitted
app_1      | crond: USER root pid   7 cmd cd /var/www/html && php artisan schedule:run >> /dev/null 2>&1
app_1      | crond: can't set groups: Operation not permitted

谁能指点我。在正确的方向上解决这个问题?

提前致谢。

标签: laraveldockercron

解决方案


推荐阅读