Home
/
User Guides
/
Dev Containers Integration

Dev Containers Integration

Early Access

Note

The Coder dev containers integration is an early access feature.

While functional for testing and feedback, it may change significantly before general availability.

The dev containers integration is an early access feature that enables seamless creation and management of dev containers in Coder workspaces. This feature leverages the @devcontainers/cli and Docker to provide a streamlined development experience.

This implementation is different from the existing Envbuilder-based dev containers offering.

Prerequisites

  • Coder version 2.22.0 or later
  • Coder CLI version 2.22.0 or later
  • A template with:
    • Dev containers integration enabled
    • A Docker-compatible workspace image
  • Appropriate permissions to execute Docker commands inside your workspace

How It Works

The dev containers integration utilizes the devcontainer command from @devcontainers/cli to manage dev containers within your Coder workspace. This command provides comprehensive functionality for creating, starting, and managing dev containers.

Dev environments are configured through a standard devcontainer.json file, which allows for extensive customization of your development setup.

When a workspace with the dev containers integration starts:

  1. The workspace initializes the Docker environment.
  2. The integration detects repositories with a .devcontainer directory or a devcontainer.json file.
  3. The integration builds and starts the dev container based on the configuration.
  4. Your workspace automatically detects the running dev container.

Features

Available Now

  • Automatic dev container detection from repositories
  • Seamless dev container startup during workspace initialization
  • Integrated IDE experience in dev containers with VS Code
  • Direct service access in dev containers
  • Limited SSH access to dev containers

Coming Soon

  • Dev container change detection
  • On-demand dev container recreation
  • Support for automatic port forwarding inside the container
  • Full native SSH support to dev containers

Limitations during Early Access

During the early access phase, the dev containers integration has the following limitations:

  • Changes to the devcontainer.json file require manual container recreation
  • Automatic port forwarding only works for ports specified in appPort
  • SSH access requires using the --container flag
  • Some devcontainer features may not work as expected

These limitations will be addressed in future updates as the feature matures.

Comparison with Envbuilder-based Dev Containers

FeatureDev Containers (Early Access)Envbuilder Dev Containers
ImplementationDirect @devcontainers/cli and DockerCoder's Envbuilder
Target usersIndividual developersPlatform teams and administrators
ConfigurationStandard devcontainer.jsonTerraform templates with Envbuilder
ManagementUser-controlledAdmin-controlled
RequirementsDocker access in workspaceCompatible with more restricted environments

Choose the appropriate solution based on your team's needs and infrastructure constraints. For additional details on Envbuilder's dev container support, see the Envbuilder devcontainer spec support documentation.

Next Steps

See an opportunity to improve our docs? Make an edit.