Files
coder/examples/templates/docker-devcontainer
dependabot[bot] 88d9ce57e1 chore: bump the coder-modules group across 6 directories with 2 updates (#26031)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-03 18:56:19 +00:00
..

display_name, description, icon, maintainer_github, verified, tags
display_name description icon maintainer_github verified tags
Docker-in-Docker Dev Containers Provision Docker containers as Coder workspaces running Dev Containers via Docker-in-Docker. ../../../site/static/icon/docker.png coder true
docker
container
devcontainer

Remote Development on Dev Containers

Provision Docker containers as Coder workspaces running Dev Containers via Docker-in-Docker.

Prerequisites

Infrastructure

The VM you run Coder on must have a running Docker socket and the coder user must be added to the Docker group:

# Add coder user to Docker group
sudo adduser coder docker

# Restart Coder server
sudo systemctl restart coder

# Test Docker
sudo -u coder docker ps

Architecture

This example uses the codercom/enterprise-node:ubuntu Docker image as a base image for the workspace. It includes necessary tools like Docker and Node.js, which are required for running Dev Containers via the @devcontainers/cli tool.

This template provisions the following resources:

  • Docker image (built by Docker socket and kept locally)
  • Docker container (ephemeral)
  • Docker volume (persistent on /home/coder)
  • Docker volume (persistent on /var/lib/docker)

This means, when the workspace restarts, any tools or files outside of the home directory or docker library are not persisted.

For devcontainers running inside the workspace, data persistence is dependent on each projects devcontainer.json configuration.

Note

This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.