digitalocean/marketplace-partners
Shell
Captured source
source ↗digitalocean/marketplace-partners
Description: Image validation, automation, and other tools for DigitalOcean Marketplace Vendors and Custom Image users
Language: Shell
License: NOASSERTION
Stars: 206
Forks: 104
Open issues: 19
Created: 2018-10-16T20:20:46Z
Pushed: 2025-12-12T17:34:05Z
Default branch: master
Fork: no
Archived: no
README:
DigitalOcean Marketplace Partner Tools
This repository contains resources for DigitalOcean Marketplace partners, like documentation on image requirements and creation, tools for image cleanup and validation, and templates for build automation.
Getting Started creating your Kubernetes based 1-Click App
Please visit our Kubernetes Marketplace repo for instructions on how to create and submit your Kubernetes based 1-Click App.
Kubernetes 1-Click Apps can be submitted via our Marketplace Kubernetes Github repo.
Getting Started creating your Droplet based 1-Click App
The overall process for creating an image that you can submit as a Droplet based 1-Click App is as follows:
1. Create and configure a build Droplet manually first to make sure your configuration works. You can create a build Droplet with any method, like the control panel, the API, or command-line tools like `doctl`. We strongly encourage you to use a $6 Droplet as your build Droplet. Using a $6 Droplet as your build Droplet will ensure that all Droplet types will be available for usage with your 1-Click App.
2. Clean up and validate the build Droplet with the provided scripts, cleanup.sh and img_check.sh. The scripts will check for and fix potential security concerns and verify that the image will be compatible with Marketplace.
3. Use Packer to create a fresh snapshot of the image that you want to create. While there are several ways to create an image, we recommend using Packer as the most simple and consistent option.
4. Submit your final image to the Marketplace team for review. This can be made through our Vendor Portal. If you've signed expressed interest in joining the Marketplace through the form on this page but you've not received a login for the Vendor Portal, please reach out to one-clicks-team@digitalocean.com and we'll help you out.
5. (Optional) Integrate a DigitalOcean Managed Database into your 1-Click App
As a Vendor, you can offer a DigitalOcean Managed Database (DBaaS) to any DigitalOcean customer at the time they spin up your Droplet based 1-Click App. You can customize your app image to integrate with the managed database directly, or let your customers complete the configuration themselves after the 1-Click App boots up. This benefits your customers in terms of database scalability and ease of management, and reduces the burden of database support for you as a vendor.
To enable this option, use the checkboxes that are shown in the Vendor Portal related to enablement of managed databases. If you’ve checked at least 1 box, when a user attempts to create your 1-Click App, they’ll receive a prompt like this one:

When a user selects the Managed Database option, DigitalOcean handles the creation of the database cluster as well as the user's Droplet. The Droplet will have a DATABASE_URL environment variable configured including a database connection string, such as:
postgresql://doadmin:@dbaas-db-11111-do-user-1111111-1.b.db.ondigitalocean.com:25060/defaultdb?sslmode=require
The user’s managed database configuration and credentials will be stored in /root/.digitalocean_dbaas_credentials in the following format.
db_protocol= db_username= db_password= db_host= db_port= db_database=
To disable this feature for any new users of your 1-Click App, simply visit the Vendor Portal to edit your 1-Click App, removing the checkboxes next to all database engines. Once you save the edits, customers will no longer be given the option to add a managed database. Note that existing customers who have already deployed a managed database in conjunction with your 1-Click App will not be affected by that removal, and their managed databases will continue to operate.
Build Automation with Packer
Packer is a tool for creating images from a single source configuration. Using this Packer template reduces the entire process of creating, configuring, validating, and snapshotting a build Droplet to a single command:
packer build marketplace-image.json
By doing this, there is a reduced likelihood of having to submit an image multiple times as a result of falling in any of the next steps:
- Installing OS updates
- Deleting bash history.
- Removing log files and SSH keys from the root user
- Enabling the firewall (i.e. ufw if you use Ubuntu)
This repository is itself a Packer template for a LAMP stack. You can modify this template to use as a starting point for your image. Note that not all of the scripts/files in this repository are strictly necessary, as this aim at covering a broad case of application.
Usage
To run the LAMP stack in this template, you'll need to install Packer and create a DigitalOcean personal access token and set it to the DIGITALOCEAN_TOKEN environment variable. Running packer build marketplace-image.json without any other modifications will create a build Droplet configured with LAMP, clean and verify it, then power it down and snapshot it.
To start adapting this template for your own image, you can customize some variables in marketplace-image.json:
apt_packageslists the APT packages to install on the build Droplet.image_namedefines the name of the resulting snapshot, which by default ismarketplace-snapshot-with a UNIX timestamp appended.
You can also modify these variables at runtime by using the `-var` flag.
Please see…
Excerpt shown — open the source for the full document.