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:
- Detects
devcontainer.jsonin your repository (.devcontainer/devcontainer.jsonor.devcontainer.json) - Provisions a VM (seedling) with Docker installed
- Applies devcontainer features at runtime via the
@devcontainers/cli - 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 containers —
imagefield - Dockerfile-based containers —
build.dockerfile - Features — applied at runtime via
@devcontainers/cli - Forward ports —
forwardPorts - Environment variables —
containerEnvandremoteEnv - Lifecycle commands —
onCreateCommand,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 autoNext Steps
- See the Devfile docs for the alternative environment spec
- Browse the devcontainer spec for the full configuration reference