cryptojo avatar

Reproducible Snap Builds via Snapcraft and LXD

cryptojo

Published: 19 Aug 2017 › Updated: 19 Aug 2017Reproducible Snap Builds via Snapcraft and LXD

Reproducible Snap Builds via Snapcraft and LXD

Advantages of Reproducible Builds

  • Reproducible, that's a win in itself.
  • You avoid polluting your environment.
  • Your build environment is consistent.

How are Reproducible Builds Made

  • snap
  • snapcraft
  • lxd

Examples of building via LXD containers

Ensure Snap is installed and Running

sudo systemctl start snapd

Installing LXD

sudo apt-get install lxd

Configuring LXD

sudo lxc init
You'll be prompted with setup questions, I recommend keeping the defaults.

Starting a Build via LXD

snapcraft cleanbuild
cleanbuild will automatically setup a new lxd container to execute your build. This makes for a completely clean build of your application.

snapcraft cleanbuild --debug
The following command will build the package in container and remain on failure. This gives you the opportunity to test and debug your build in a bash shell.

Official Video

If you'd like to hear about it in more detail, here is snapcraft's official video on the subject.

Leave Reproducible Snap Builds via Snapcraft and LXD to:

Written by

Read more #linux posts


Best Posts From cryptojo

We have not curated any of cryptojo's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From cryptojo