docker中timedatectrl命令报“Failed to create bus connection: No such file or directory”

问题解决:

  1. 启动docker时将/usr/sbin/init启动:docker run --name yourdockername --privileged -d centos:7 /usr/sbin/init
  2. 启动参数添加--privileged参数,用于给予此container更多特权

完成后, timedatectrl将可正常使用

image.png

你可能感兴趣的:(docker中timedatectrl命令报“Failed to create bus connection: No such file or directory”)