如何解决“invoke-rc.d:policy-rc.d拒绝执行start.”当构建一个docker容器Ubuntu 20.04和安装jenkins时?

eoigrqb6  于 2022-12-11  发布在  Jenkins
关注(0)|答案(1)|浏览(583)

我试图在ubuntu上安装jenkins:20.04 docker容器和策略拒绝启动jenkins服务器。当我试图安装jenkins时,下面的错误响应。
创建了符号链接/etc/systemd/system/multi-user.target.需要/jenkins.service → /lib/systemd/system/jenkins. service.调用-rc.d:无法确定当前运行级别invoke-rc.d:policy-rc.d拒绝执行start。
如何解决这个问题?如果它是一个问题。

...
invoke-rc.d: policy-rc.d denied execution of start.
...
gmxoilav

gmxoilav1#

policy-rc.d只有一个用途,它应该通过其退出状态告诉invoke-rc.d是否允许该操作。From debian docs

Debian policy states that packages providing system services need to start those services
   by default, and that the starting of the service should be done by way of the
   /usr/sbin/invoke-rc.d script. This script will execute a program /usr/sbin/policy-rc.d if
   it exists, allowing the local system administrator to override behaviour if wanted by
   creating a policy script according to the interface specified and installing it as
   /usr/sbin/policy-rc.d.

你应该给我们提供更多的信息。你的Docker文件。你是在Docker里面运行Docker吗?

相关问题