8000 update envbuilder doc with dev container integration consideration · coder/coder@d9f818c · GitHub
[go: up one dir, main page]

Skip to content

Commit d9f818c

Browse files
committed
update envbuilder doc with dev container integration consideration
1 parent 747822e commit d9f818c

File tree

1 file changed

+21
-78
lines changed
  • docs/admin/templates/managing-templates/devcontainers

1 file changed

+21
-78
lines changed

docs/admin/templates/managing-templates/devcontainers/index.md

Lines changed: 21 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -14,91 +14,33 @@ pre-approved by platform teams in registries like
1414
workflows, reduces the need for tickets and approvals, and promotes greater
1515
independence for developers.
1616

17-
## Prerequisites
18-
19-
An administrator should construct or choose a base image and create a template
20-
that includes a `devcontainer_builder` image before a developer team configures
21-
dev containers.
22-
23-
## Benefits of devcontainers
24-
25-
There are several benefits to adding a dev container-compatible template to
26-
Coder:
27-
28-
- Reliability through standardization
29-
- Scalability for growing teams
30-
- Improved security
31-
- Performance efficiency
32-
- Cost Optimization
33-
34-
### Reliability through standardization
35-
36-
Use dev containers to empower development teams to personalize their own
37-
environments while maintaining consistency and security through an approved and
38-
hardened base image.
39-
40-
Standardized environments ensure uniform behavior across machines and team
41-
members, eliminating "it works on my machine" issues and creating a stable
42-
foundation for development and testing. Containerized setups reduce dependency
43-
conflicts and misconfigurations, enhancing build stability.
44-
45-
### Scalability for growing teams
17+
This doc explains how to use Envbuilder to integrate dev containers in a template.
4618

47-
Dev containers allow organizations to handle multiple projects and teams
48-
efficiently.
19+
For the Docker-based Dev Containers integration, follow the [Configure a template for dev containers](../../extending-templates/devcontainers.md) documentation.
4920

50-
You can leverage platforms like Kubernetes to allocate resources on demand,
51-
optimizing costs and ensuring fair distribution of quotas. Developer teams can
52-
use efficient custom images and independently configure the contents of their
53-
version-controlled dev containers.
54-
55-
This approach allows organizations to scale seamlessly, reducing the maintenance
56-
burden on the administrators that support diverse projects while allowing
57-
development teams to maintain their own images and onboard new users quickly.
58-
59-
### Improved security
60-
61-
Since Coder and Envbuilder run on your own infrastructure, you can use firewalls
62-
and cluster-level policies to ensure Envbuilder only downloads packages from
63-
your secure registry powered by JFrog Artifactory or Sonatype Nexus.
64-
Additionally, Envbuilder can be configured to push the full image back to your
65-
registry for additional security scanning.
66-
67-
This means that Coder admins can require hardened base images and packages,
68-
while still allowing developer self-service.
69-
70-
Envbuilder runs inside a small container image but does not require a Docker
71-
daemon in order to build a dev container. This is useful in environments where
72-
you may not have access to a Docker socket for security reasons, but still need
73-
to work with a container.
74-
75-
### Performance efficiency
76-
77-
Create a unique image for each project to reduce the dependency size of any
78-
given project.
79-
80-
Envbuilder has various caching modes to ensure workspaces start as fast as
81-
possible, such as layer caching and even full image caching and fetching via the
82-
[Envbuilder Terraform provider](https://registry.terraform.io/providers/coder/envbuilder/latest/docs).
21+
## Prerequisites
8322

84-
### Cost optimization
23+
An administrator should construct or choose a base image and create a template
24+
that includes an Envbuilder container image `coder/envbuilder` before a developer team configures dev containers.
8525

86-
By creating unique images per-project, you remove unnecessary dependencies and
87-
reduce the workspace size and resource consumption of any given project. Full
88-
image caching ensures optimal start and stop times.
26+
## Benefits of Envbuilder
8927

90-
## When to use a dev container
28+
Key differences compared with the [Docker-based integration](../../extending-templates/devcontainers.md):
9129

92-
Dev containers are a good fit for developer teams who are familiar with Docker
93-
and are already using containerized development environments. If you have a
94-
large number of projects with different toolchains, dependencies, or that depend
95-
on a particular Linux distribution, dev containers make it easier to quickly
96-
switch between projects.
30+
| Capability / Trait | Dev Containers integration (CLI-based) | Envbuilder Dev Containers |
31+
|------------------------------------------|------------------------------------------|-------------------------------------------|
32+
| Build engine | `@devcontainers/cli` + Docker | Envbuilder transforms the workspace image |
33+
| Runs separate Docker container | Yes (parent workspace + child container) | No (modifies the parent container) |
34+
| Multiple Dev Containers per workspace | Yes | No |
35+
| Rebuild when `devcontainer.json` changes | Yes (auto-prompt) | Limited (requires full workspace rebuild) |
36+
| Docker required in workspace | Yes | No (works in restricted envs) |
37+
| Admin vs. developer control | Developer decides per repo | Platform admin manages via template |
38+
| Templates | Standard `devcontainer.json` | Terraform + Envbuilder blocks |
39+
| Suitable for CI / AI agents | Yes. Deterministic, composable | Less ideal. No isolated container |
9740

98-
They may also be a great fit for more restricted environments where you may not
99-
have access to a Docker daemon since it doesn't need one to work.
41+
Consult the full comparison at [Choose an approach to Dev Containers](../../extending-templates/dev-containers-envbuilder.md).
10042

101-
## Devcontainer Features
43+
## Dev container Features
10244

10345
[Dev container Features](https://containers.dev/implementors/features/) allow
10446
owners of a project to specify self-contained units of code and runtime
@@ -119,4 +61,5 @@ of the Coder control plane and even run within a CI/CD pipeline.
11961

12062
## Next steps
12163

122-
- [Add a dev container template](./add-devcontainer.md)
64+
- [Add an Envbuilder dev container template](./add-devcontainer.md)
65+
- [Choose an approach to Dev Containers](../../extending-templates/dev-containers-envbuilder.md)

0 commit comments

Comments
 (0)
0