Lxd: ubuntu-minimal image

Created on 14 Sep 2017  路  6Comments  路  Source: lxc/lxd

It seems that the ubuntu images for lxd, are in essence ubuntu-server, both with and without cloud-init, depending on server downloaded from. If the server has capacity, can an ubuntu-minimal image be created, both with and without cloud-init? Looking for the most stripped down image possible, so that what's needed can be added, rather than having to purge extraneous packages.

Most helpful comment

Or now that Ubuntu Minimal has been released:

# lxc remote add --protocol simplestreams ubuntu-minimal https://cloud-images.ubuntu.com/minimal/releases/
# lxc launch ubuntu-minimal:bionic

All 6 comments

images:ubuntu/xenial would be a very light Ubuntu image you can use instead of ubuntu:16.04 and doesn't contain cloud-init.

I personally do use the cloud-init version, otherwise I end up with no networking, I just mentioned with/without as I know one of your image servers is cloud-enabled and the other isn't. Currently using xenial for most images. Yakkety is already out of support, and xenial is currently disfunctional when it comes to overlays in docker 1.13 swarm, so using zesty for that. They're all a bit heavy (over 400 lines 'apt list | grep installed). Trying not to have to spend half my build times running apt-get purges.

So if you want to use a pre-made Ubuntu image, you have two choices:

  • ubuntu: (full ubuntu-server with cloud init)
  • images:ubuntu/ (somewhat minimal ubuntu image without cloud-init)

You can add/remove stuff from those and publish as a new local image.

Or alternatively you can build a rootfs from scratch on your host using "debootstrap", install whatever you want in there, tar it up and use that as your image (along with the needed metadata).
That's covered in doc/image-handling.md

I'm sorry, I thought the images: versions were only different in terms of cloud-init, let me check out one of those versions

Thank you, that was what I was hoping for. I thought the two remotes had the same images, except for being "cloud-enabled". I can use the images: as a base, add cloud-init, and then the particulars for a couple of images. With that image, I can even drop it into CI and never have to look at it again. :)

Or now that Ubuntu Minimal has been released:

# lxc remote add --protocol simplestreams ubuntu-minimal https://cloud-images.ubuntu.com/minimal/releases/
# lxc launch ubuntu-minimal:bionic
Was this page helpful?
0 / 5 - 0 ratings