Note:容器连接宿主机dbus

需要挂载四个目录/文件:

  • /var/run/dbus 和/run/systemd

套接字目录

  • /usr/bin/systemctl

使用宿主机的systemctl

  • /etc/systemd/system

需要增加新节点时需要挂载该目录

例子

docker run -it -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /usr/bin/systemctl:/usr/bin/systemctl -v /etc/systemd/system:/etc/systemd/system debian:jessie /bin/bash


参考

google group

2
说点什么

avatar
1 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
momoSolyn Recent comment authors
  Subscribe  
提醒
Solyn
游客

测试一下评论~鹿鹿的从去年炸到今年

Optimized with PageSpeed Ninja