我试图在Docker容器上运行cron作业.我有一个正在运行的容器(Fedora 20).
我还在容器中安装了cron包并显式运行了cron守护进程.
我还检查了cron.deny文件是否为空,并且/ etc /目录下没有名为cron.allow的文件.
Whenever I tried to set the cronjob by using crontab -e or trying to list the cron job using
crontab -l I am getting following error.
bash-4.2# crontab -l
You (root) are not allowed to access to (crontab) because of pam configuration.
bash-4.2# crontab -e
You (root) are not allowed to access to (crontab) because of pam configuration.
我还检查了它后面的/etc/pam.d/crond文件
bash-4.2 #vi /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
# No PAM authentication called,auth modules not needed
account required pam_access.so
account include password-auth
session required pam_loginuid.so
session include password-auth
auth include password-auth
有谁遇到过这个问题?如果是的话,请你指点一下吗?
提前致谢.
Traditionally a Docker container runs a single process when it is
launched,for example an Apache daemon or a SSH server daemon. Often
though you want to run more than one process in a container. There are
a number of ways you can achieve this ranging from using a simple Bash
script as the value of your container’s CMD instruction to installing
a process management tool.In this example we’re going to make use of the process management
tool,Supervisor,to manage multiple processes in our container. Using
Supervisor allows us to better control,manage,and restart the
processes we want to run. To demonstrate this we’re going to install
and manage both an SSH daemon and an Apache daemon.