Report this

What is the reason for this report?

What are the base images for the supported droplet OS images? And what is the best way to build a custom image from them?

Posted on November 22, 2023

I’m thinking I want to build a custom image using Ubuntu 22.04 LTS, but doing so using the server live CD is less than optimal due to lots of unnecessary stuff (such as firmware, kernel modules, etc.) getting installed anyway.

So I’m wondering: 1) what images are the basis for DO’s supported droplet OS images? (so I can start with the closest thing to supported) and 2) how were they “built” or modified? (And what’s the best tool for building/modifying a cloud image offline?)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

DigitalOcean’s base images for droplet OS images are minimal and optimized versions of the operating systems, tailored for a cloud environment. For Ubuntu, they typically start with a minimal base image provided by Canonical, the company behind Ubuntu:

https://docs.digitalocean.com/products/images/custom-images/

To build a custom image:

  1. Start with a minimal base image of Ubuntu from Canonical’s official cloud images.
  2. Use tools like Packer to build the customize the image. Packer allows you to automate the creation of machine images and can work with various platforms including DigitalOcean.

You can take a look at the DigitalOcean 1-Click repo which contains a lot of Packer projects for building the Marketplace images:

https://github.com/digitalocean/droplet-1-clicks/

For modification, Ansible, Terraform, or even a simple bash script can be used to provision and configure the image once it’s deployed to a droplet. Ensure to remove any unnecessary packages or services to keep the image lean. After customizing, you can use DigitalOcean’s snapshot feature to create a reusable custom image:

https://www.digitalocean.com/community/tutorials/how-to-use-ansible-to-automate-initial-server-setup-on-ubuntu-18-04

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.