我想自定义 https://github.com/erkules/codership-imagesDockerfile入口点
我在Dockerfile创建一个cron作业,并试图用CMD运行它,知道Dockerfile为erkules图像具有以下系统信息库提供的泊坞窗图像入口点["/entrypoint.sh"]
。它没有工作。
我试图创建一个单独的cron-entrypoint.sh并将其添加到dockerfile中,然后测试像这样的ENTRYPOINT ["/entrypoint.sh", "/cron-entrypoint.sh"]
。但也得到一个错误。
我尝试将cron作业添加到erkules映像的entrypoint.sh中,当我将它放在开头时,容器运行cron作业但不执行其余的entrypoint.sh。当我把cron脚本放在entrypoint.sh的末尾时,cron作业不会运行,但是entrypoint.sh中的任何东西都会被执行。
如何通过Dockerfile同时运行erkules图像的entrypoint.sh和我的cron作业中的内容?
它应该是ENTRYPOINT [“./entrypoint.sh”]吗? –
将'crond'添加到entrypoint.sh –
不需要......只要我可以同时运行entrypoint.sh和cron作业 – montatich