Build a Vultr Marketplace application image from vendor data using the Vultr Console or Vultr API to package your app for customer instance deployments.
Building from Vendor Data creates an "imageless" app: customers deploy a clean operating system, and your Vendor Data script does everything required to deliver a working application. This avoids maintaining a snapshot and is the recommended approach whenever your application supports it.
This guide explains how to build an image from Vendor Data using the Vultr Console or the Vultr API.
Click Marketplace in the Vultr Console's left-hand menu, click the application name, then click the Builds tab. The Build App Image From Vendor Data section displays by default. If the snapshot selector displays instead, click Build From Snapshot to switch back.
Select a base operating system from the Operating System dropdown.
Enter your Vendor Data script in the text area, which starts prefilled with #!/bin/bash.
Click Build App Image.
Verify that the new build appears in the Builds list with its status.
After you build the image, you can edit the Vendor Data script by selecting the actions menu and choosing Edit. Learn more in the cloud-init Vendor Data documentation.
Send a POST request to the Create Marketplace App Build Image endpoint. Replace {app-id} with the app's ID, INSTALLATION-SCRIPT with your Vendor Data script, and OS-ID with an operating system ID from How to List Marketplace Operating Systems.
$ curl "https://api.vultr.com/v2/marketplace/apps/{app-id}/builds" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"use_vendor_data": true,
"installation_script": "INSTALLATION-SCRIPT",
"OSID": OS-ID
}'
A successful request returns an HTTP 201 Created response with the build's marketplace_image_id.