我想建立一个基于centos:systemd
的码头图像。在我Dockerfile我正在运行依赖于systemd运行一个命令,这个失败,出现以下错误:码头建设如何运行与centos中间容器:systemd
Failed to get D-Bus connection: Operation not permitted
error: %pre(mod-php-7.1-apache2-zend-server-7.1.7-16.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package mod-php-7.1-apache2-zend-server-7.1.7-16.x86_64
我怎样才能得到中间容器与--privileged
和映射-v /sys/fs/cgroup:/sys/fs/cgroup:ro
运行?
如果我注释掉安装程序,只运行容器并手动执行安装程序,它会正常工作。
这里是Dockerfile
FROM centos/systemd
COPY ./ZendServer-9.1.0-RepositoryInstaller-linux.tar.gz /opt
RUN tar -xvf /opt/ZendServer-9.1.0-RepositoryInstaller-linux.tar.gz -C /opt/
RUN /opt/ZendServer-RepositoryInstaller-linux/install_zs.sh 7.1 java --automatic
谢谢@wmorrell现在会尝试,忘记手动提交,可能是一个很好的解决方法,直到我可以找出如何自动化它。 –
尝试手动启动init时,出现同样的D-Bus错误 –