Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: describe devcontainers as deployment model #12877

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions docs/about/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,54 @@ Coder on Kubernetes.
[Microsoft Entra ID Sign-On](https://learn.microsoft.com/en-us/entra/identity/app-proxy/)
- For GCP:
[Google Cloud Identity Platform](https://cloud.google.com/architecture/identity/single-sign-on)

### Dev Container

Note: _Dev containers_ are at early stage and considered experimental at the
moment.

This architecture enhances a Coder workspace with a
[development container](https://containers.dev/) setup built using the
[envbuilder](https://github.com/coder/envbuilder) project. Workspace users have
the flexibility to extend generic, base developer environments with custom,
project-oriented [features](https://containers.dev/features) without requiring
platform administrators to push altered Docker images.

Learn more about
[Dev containers support](https://coder.com/docs/v2/latest/templates/devcontainers)
in Coder.

![Architecture Diagram](../images/architecture-devcontainers.png)

#### Components

The deployment model includes:

- _Workspace_ built using Coder template with _envbuilder_ enabled to set up the
developer environment accordingly to the dev container spec.
- _Container Registry_ for Docker images used by _envbuilder_, maintained by
Coder platform engineers or developer productivity engineers.

Since this model is strictly focused on workspace nodes, it does not affect the
setup of regional infrastructure. It can be deployed alongside other deployment
models, in multiple regions, or across various cloud platforms.

##### Workload resources

**Workspace**

- Docker and Kubernetes based templates are supported.
- The `docker_container` resource uses `ghcr.io/coder/envbuilder` as the base
image.

_Envbuilder_ checks out the base Docker image from the container registry and
installs selected features as specified in the `devcontainer.json` on top.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, this update is beautiful, super clear. ❤️

Eventually, it starts the container with the developer environment.

##### Workload supporting resources

**Container Registry (optional)**

- Workspace nodes need access to the Container Registry to check out images. To
shorten the provisioning time, it is recommended to deploy registry mirrors in
the same region as the workspace nodes.
Binary file added docs/images/architecture-devcontainers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions docs/templates/devcontainers.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Devcontainers (alpha)
# Dev Containers (alpha)

[Devcontainers](https://containers.dev) are an open source specification for
defining development environments.
[Development containers](https://containers.dev) are an open source
specification for defining development environments.

[envbuilder](https://github.com/coder/envbuilder) is an open source project by
Coder that runs devcontainers via Coder templates and your underlying
Coder that runs dev containers via Coder templates and your underlying
infrastructure. It can run on Docker or Kubernetes.

There are several benefits to adding a devcontainer-compatible template to
Coder:

- Drop-in migration from Codespaces (or any existing repositories that use
devcontainers)
- Drop-in migration from Codespaces (or any existing repositories that use dev
containers)
- Easier to start projects from Coder. Just create a new workspace then pick a
starter devcontainer.
- Developer teams can "bring their own image." No need for platform teams to
Expand Down Expand Up @@ -47,7 +47,7 @@ information.

## Caching

To improve build times, devcontainers can be cached. Refer to the
To improve build times, dev containers can be cached. Refer to the
[envbuilder documentation](https://github.com/coder/envbuilder/) for more
information.

Expand Down