Issues running cron in Docker on different hosts

前端 未结 4 1227
谎友^
谎友^ 2020-12-15 03:56

Im trying to get a docker container running to mange my cronjobs

im running a very simple cron as a test in a docker container using centOS 6.5 base



        
4条回答
  •  不思量自难忘°
    2020-12-15 04:27

    @dwitz's answer is correct but I had to alter the sed command a bit to make it work for me on Ubuntu 16.04 within a docker container.

    cat /etc/pam.d/cron |sed -e "s/required     pam_loginuid.so/optional     pam_loginuid.so/g" > /tmp/cron && mv /tmp/cron /etc/pam.d/cron 
    

提交回复
热议问题