Presets

Generate a Dockerfile from a preset

Returns the Dockerfile content and build arguments for a given preset slug. The CLI can use this to build Docker images locally without needing a Dockerfile in the project directory, enabling zero-config deployments.

post/presets/{slug}/dockerfile

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/presets/{slug}/dockerfile
  • Auth: HTTP bearer

Path parameters

slugstring required

Preset slug (e.g., nextjs, vite, python)

Request body

build_commandstring nullable

Custom build command (overrides preset default)

install_commandstring nullable

Custom install command (overrides preset default)

output_dirstring nullable

Output directory for static builds

package_managerstring nullable

Package manager used by the project (npm, yarn, pnpm, bun) If not provided, defaults to npm

project_namestring nullable

Project name/slug used for container naming

use_buildkitboolean

Whether to use BuildKit cache mounts for faster builds

Example request

{
  "build_command": "npm run build",
  "install_command": "npm ci",
  "output_dir": "dist",
  "package_manager": "npm",
  "project_name": "my-app"
}

Response

Generated Dockerfile

build_argsobject required

Build arguments to pass to docker build --build-arg KEY=VALUE

dockerfilestring required

The generated Dockerfile content

presetstring required

The preset slug used for generation

Changes

No recorded changes to this operation across all 50 revisions of this API.