[lxc-users] lxd-client on 20.04 focal

0 views
Skip to first unread message

Logan V.

unread,
Jul 12, 2020, 8:50:08 PM7/12/20
to lxc-...@lists.linuxcontainers.org
Typically I use lxd-client in jobs that run in docker containers, so the container has the lxd-client apt package installed. Now it seems that the lxd and lxd-client are just shims for the snap.

Since it seems like installing snaps in docker (ie. environments without snapd running) is very difficult, I'm curious if any consideration has been given to how lxd-client can be installed aside from snaps? Are there any ppas or something I should be using instead?

Thanks,
Logan

Fajar A. Nugraha

unread,
Jul 12, 2020, 10:45:16 PM7/12/20
to LXC users mailing-list
On Mon, Jul 13, 2020 at 7:50 AM Logan V. <lo...@protiumit.com> wrote:
>
> Typically I use lxd-client in jobs that run in docker containers, so the container has the lxd-client apt package installed. Now it seems that the lxd and lxd-client are just shims for the snap.
>
> Since it seems like installing snaps in docker (ie. environments without snapd running) is very difficult, I'm curious if any consideration has been given to how lxd-client can be installed aside from snaps? Are there any ppas or something I should be using instead?

What are you using lxd client for?

If it's as simple as "creating a container" or "running lxc shell/lxc
exec", IIRC old versions of lxd client (3.03 should still be available
on previous distros) can connect to newer lxd server as well

--
Fajar

Stéphane Graber

unread,
Jul 12, 2020, 11:28:48 PM7/12/20
to LXC users mailing-list
If shoving a static binary in your Docker container is an option, it's
pretty simple to build the LXD client alone as a static binary.

Install "golang-go" and "git", then run "go get
github.com/lxc/lxd/lxc". This will take a little while as it downloads
the needed source trees.
Once done, you'll find a "lxc" binary in ~/go/bin/ which you can start
using as standalone client.

> _______________________________________________
> lxc-users mailing list
> lxc-...@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

--
Stéphane

Reply all
Reply to author
Forward
0 new messages