在Docker容器中运行lxd,并有probelms

我正在使用Ubuntu 16.10.3映像来探索Juju的魅力。 作为一个先决条件, juju需要安装lxd 。 我成功地安装了lxd但是当我继续创build我的第一个Juju魅力时,它失败,出现这个错误:

 root@615c0e53c7f7:/# juju bootstrap localhost test ERROR creating LXD client: can't connect to the local LXD server: LXD socket not found; is LXD installed & running? Please install LXD by running: $ sudo apt-get install lxd and then configure it with: $ newgrp lxd $ lxd init 

由于lxd已经安装了,所以我继续运行lxd init ,这个错误再次失败:

 root@615c0e53c7f7:/# lxd init error: Unable to talk to LXD: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory 

现在,当我只是在terminal上inputlxd ,然后回车,我看到这个日志:

 root@615c0e53c7f7:/# lxd WARN[01-20|10:15:20] AppArmor support has been disabled because of lack of kernel support WARN[01-20|10:15:20] Per-container AppArmor profiles are disabled because LXD is already protected by AppArmor. WARN[01-20|10:15:20] Couldn't find the CGroup pids controller, process limits will be ignored. WARN[01-20|10:15:20] CGroup memory swap accounting is disabled, swap limits will be ignored. 

如果我去了docker的根源,它使用lxc,apparmor等库。

在非docker,它工作得很好。 我能够安装lxdjuju ,工作正常。