- Notifications
You must be signed in to change notification settings - Fork1k
feat(examples/templates): adddocker-devcontainer
template and rename envbuilder template#18741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
920b2d6
cc61eff
343d1c1
4b2a928
68a298f
314e219
e866af2
ec80cb0
b9a3b72
f87b28a
ab40359
ecb35db
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
--- | ||
display_name: Docker-in-Docker Dev Containers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Open to naming suggestions. | ||
description: ProvisionDocker containers as Coder workspaces running Dev Containers via Docker-in-Docker. | ||
icon: ../../../site/static/icon/docker.png | ||
maintainer_github: coder | ||
verified: true | ||
tags: [docker, container, devcontainer] | ||
--- | ||
# Remote Development onDev Containers | ||
Provision Docker containers as [Coder workspaces](https://coder.com/docs/workspaces) running [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) via Docker-in-Docker. | ||
<!-- TODO: Add screenshot --> | ||
## Prerequisites | ||
### Infrastructure | ||
The VM you runCoderonmust have a running Docker socket and the `coder` user must beadded totheDocker group: | ||
```sh | ||
# Add coder user to Docker group | ||
sudoadduser coder docker | ||
# Restart Coder server | ||
sudo systemctl restart coder | ||
@@ -30,48 +32,18 @@ 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. | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.