OOrchard

Devcontainers

Orchard's primary environment spec is the devcontainer format. If your repository contains a .devcontainer/devcontainer.json, Orchard uses it to configure the development environment inside each grove.

How It Works

When you plant a grove, Orchard:

  1. Detects devcontainer.json in your repository (.devcontainer/devcontainer.json or .devcontainer.json)
  2. Provisions a VM (seedling) with Docker installed
  3. Applies devcontainer features at runtime via the @devcontainers/cli
  4. Starts the devcontainer(s) defined in your config (the fruits)

What's Supported

Orchard supports the full devcontainer.json specification as of v0.2.0, including:

  • Image-based containersimage field
  • Dockerfile-based containersbuild.dockerfile
  • Features — applied at runtime via @devcontainers/cli
  • Forward portsforwardPorts
  • Environment variablescontainerEnv and remoteEnv
  • Lifecycle commandsonCreateCommand, postCreateCommand, postStartCommand, postAttachCommand
  • Customizations — editor settings, extensions

Precedence

When a repository contains both devcontainer.json and devfile.yaml, Orchard prefers devcontainer.json by default. You can override this with the --spec flag:

code
# Use devcontainer.json (default)
trowel grove plant https://github.com/your-org/your-repo --spec devcontainer
 
# Use devfile.yaml (ignore devcontainer.json)
trowel grove plant https://github.com/your-org/your-repo --spec devfile
 
# Auto-detect (devcontainer preferred, devfile fallback)
trowel grove plant https://github.com/your-org/your-repo --spec auto

Next Steps