Fasten snapcraft cleanbuild

I have a slow(er) internet and many a time it becomes a challenge to rebuild a snap, mostly the time is wasted on setting up a LXD container as it would download the core and snapcraft snaps (I am on 18.04, so host snaps are not pushed to the container).

Wouldn’t it be faster if we had a LXD image with core and snapcraft snaps preinstalled, updated every day and published somewhere so that the build-test cycle becomes quicker ?

Might also make sense to provide some kind of mechanism to keep the container created by “cleanbuild” for further use or at least provide a way to use an already existing LXD container.


I am willing to contribute if we want to do any of the above suggestions (or more intelligent variants)

A couple of other options you may want to try. I have a static lxd I build in. I don’t tear it down for every build, but leave it alone. So all the debian packages that were on it to get started are all still there. I just rebuild over and over inside that container. The other option is to use multipass or some other VM.

1 Like

Refer How to create a LXD container for snap development

Does Multipass and base/core snaps “fix” this speed issue?