docker - initctl 太旧 Upstart 检查

标签 docker ubuntu-14.04 upstart

我正在尝试使用 init-checkconf 对 upstart 脚本进行语法检查。但是,当我运行它时,它会返回 ERROR: version of/sbin/initctl too old

我不知道该怎么做,我尝试重新安装 upstart 但没有任何变化。这是从 docker 容器 (ubuntu:14.04) 中运行的,这可能与它有关。

最佳答案

我刚刚遇到了同样的问题。

查看容器:

root@puppet-master:/# cat /sbin/initctl
#!/bin/sh
exit 0

我还没有完全测试它,但我在我的 Dockerfile 中添加了以下内容:

# Fix upstart
RUN rm -rf /sbin/initctl && ln -s /sbin/initctl.distrib /sbin/initctl

我以为 this链接解释得很好:

When your Docker container starts, only the CMD command is run. The only processes that will be running inside the container is the CMD command, and all processes that it spawns. That's why all kinds of important system services are not run automatically – you have to run them yourself.

进一步挖掘,我发现了一个官方 Ubuntu 镜像,其中包含一个 Upstart 的工作版本: https://registry.hub.docker.com/_/ubuntu-upstart/

关于docker - initctl 太旧 Upstart 检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28596795/

相关文章:

docker - Docker不从容器输出日志

docker - Docker内部的Docker中的卷?

docker - 在创建卷之前将文件复制到Docker容器内部(具有自定义配置的Solr Docker镜像)

java - tomcat v8.0 无法在 ubuntu 上启动

linux - 如何调试间歇性失败的 upstart 脚本?

ubuntu - python 脚本到 .deb ubuntu 包来安装守护进程

django - 同一代码库的多个docker撰写环境

mysql - 如何在Linux中输入sql命令时出现提示?

python - ImportError : No module named numpy. distutils.core(Ubuntu xgboost 安装)

logging - Upstart 日志中的时间戳