Docker 运行容器 CentOS7 使用systemctl 启动报错 Failed to get D-Bus connection: Operation not permitted
原系统:Centos 7
Docker 版本:1.12.6
操作:安装并运行 Tomcat
问题:在创建好容器之后,并且进入系统运行启动tomcat
[root@cd11558d3a22 /]# systemctl restart tomcat
Failed to get D-Bus connection: Operation not permitted
解决方法:
在运行时配置命令如下:
请注意下面端口信息跟id 跟name 随便更换,不能更换-v 的内容跟权限
docker run -p 8080:8080 -d -e "container=docker" --privileged=true -v /sys/fs/cgroup:/sys/fs/cgroup --name centos7_tomcat 196e0ce0c9fb /usr/sbin/init
连接容器命令:
[root@localhost /]# docker exec -it cd11558d3a22 /bin/bash
以上问题解决,比官方提供的解决方案简单化;
Docker 运行容器 CentOS7 使用systemctl 启动报错 Failed to get D-Bus connection: Operation not permitted的更多相关文章
- libvirt启动报错Failed to start Virtualization daemon
libvirt启动报错Failed to start Virtualization daemon 1.启动libvirt的具体报错如下 [root@localhost IOS]# service li ...
- Spring boot 启动报错 Failed to auto-configure a DataSource
1.Spring boot 启动报错 Failed to auto-configure a DataSource 参考资料https://blog.csdn.net/liuyinfei_java/ar ...
- springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde 创建 ...
- 巨坑npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build/css/add.p
Windows10环境 npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build ...
- SpringBoot启动报错Failed to determine a suitable driver class
SpringBoot启动报错如下 Error starting ApplicationContext. To display the conditions report re-run your app ...
- Eclipse启动 报错[Failed to load the JNI shared library jvm.dll
准备要做java服务器,在安装开发环境时,启动Eclipse报错[Failed to load the JNI shared library jvm.dll] 研究了下,造成错误的原因是由于eclip ...
- SpringBoot2 启动报错 Failed to auto-configure a DataSource
今天Spring Boot 2.0正式版发布,寻思着搭个小demo尝试一下Spring Boot的新特性,使用idea创建项目.在选择组件时添加了mysql.mybatis 然后在第一次启动的时候启动 ...
- Spring boot&Mybatis 启动报错 Failed to auto-configure a DataSource
*************************** APPLICATION FAILED TO START *************************** Description: Fai ...
- 新建Spring boot 启动报错 Failed to auto-configure a DataSource
今天学习springboot,使用idea创建项目.在选择组件时添加了mysq 然后在第一次启动的时候启动报错,错误信息如下: ***************************APPLICATI ...
随机推荐
- 二分查找(python)
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/4/29 9:11 # @Author : Jackendoff # @Sit ...
- 【ccf-csp201512-5】矩阵
click 试题编号: 201512-5 试题名称: 矩阵 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 创造一个世界只需要定义一个初状态和状态转移规则. 宏观世界的物体运动 ...
- Opencv笔记(九)——图像阈值
学习目标: 学习简单阈值,自适应阈值,Otsu's 二值化等 学习函数cv2.threshold,cv2.adaptiveThreshold 等. 一.简单阈值 与名字一样,这种方法非常简单.但像素值 ...
- [LC] 430. Flatten a Multilevel Doubly Linked List
You are given a doubly linked list which in addition to the next and previous pointers, it could hav ...
- [LC] 273. Integer to English Words
Convert a non-negative integer to its english words representation. Given input is guaranteed to be ...
- 吴裕雄--天生自然python Google深度学习框架:TensorFlow实现神经网络
http://playground.tensorflow.org/
- day36-进程操作实例,守护进程,方法,属性
#1.server端跟多个client端聊天: #异步操作,主进程负责接收client的连接,子进程负责跟client聊天. #每接收一个连接,就创建一个子进程,子进程之间的数据是隔离的,互不影响,所 ...
- Java多线程处理任务(摘抄)
很多时候,我们需要对一个庞大的队列或者二维数组进行处理.这些处理可能是循环的,比如给一个excel多个sheet的联系人列表发邮件.很幼稚的方法就是用一个或者两个FOR循环搞定,对于庞大的数据有得让你 ...
- QQ消息群发助手(超级简单)
大家好!我开发的小工具,效果见动图: 下载地址 QQ群发助手.rar 代码: def Login(): global Flag try: bot.Login(['-q',v1.get()]) tkin ...
- fidder 抓包工具设置只拦截指定ip(服务ip)
直接上图: