I created an ubuntu:20.04 container on an Ubuntu 18.04 host with snap LXD 4.0.1.
I then start a shell in the new container and run: “snap list”. I see the following:
Name Version Rev Tracking Publisher Notes core18 20200311 1705 latest/stable canonical✓ base lxd 4.0.1 14890 latest/stable/… canonical✓ - snapd 2.44.3 7264 latest/stable canonical✓ snapd
Why and how did these get installed? Were they included in the image, or downloaded by snapd? I was hoping that they are somehow shared from the host and not downloaded from scratch, but the snap versions are different from the host. The host has:
> Name Version Rev Tracking Publisher Notes > core 16-2.44.3 9066 latest/stable canonical✓ core > core18 20200427 1754 latest/stable canonical✓ base > lxd 4.0.1 14890 latest/stable canonical✓ -
The lxd snap is the same version on both the host and the container. core18 has an older version in the container than the host has. core is present only in the host. And snapd is present only in the container.
Since snaps are mostly read-only filesystems, couldn’t they be shared between the host and containers, or between containers?