Applies the Vale findings spike review's `ensure`, `should`, and `since` decisions, following `word-choice.md#choose-words-that-have-one-meaning`. ## `ensure`, `ensures`, `ensuring`: every row marked valid - 148 lines in 70 files. - Most became `make sure`, `makes sure`, or `making sure`. - When the subject isn't a person, I used a verb that reads better, such as `guarantees`, `keeps`, `prevents`, `maintains`, or `provides`. - `admin/monitoring/health-check.md:227`: "Make sure that" is now "Make sure", so the step stays within `Coder.StepLength`. - Left as-is: `admin/setup/configuration-reference.md:1339`, which is generated from `codersdk`. ## `should` and `since`: only rows with a verdict or a note - `.style/README.md`: "what should be routed elsewhere" is now "what to route elsewhere". - `.style/content-guidelines.md`: - "Avoid mixing those modes within a single page." - "Every page must be accurate" - "Check docs claims against the actual implementation" - "must include the documentation" - "Support owns the content they produce." - "because they don't change" - `.style/styles/Coder/README.md`: "must link to the matching section". - `admin/external-auth.md`: - "The redirect URI for Gitea is ..." - "Use custom authentication and token URLs ...", which is now active voice. - `envbuilder-releases-known-issues.md`: "so it's experimental and prone to breaking changes". Rows marked unsure with no note were left alone: `content-guidelines.md` lines 49, 330, and 405, and `envbuilder/index.md:24`. The changed files have no new findings from other rules. --- AI-generated by Superblink on behalf of @nickvigilante. --------- Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
57 lines
3.0 KiB
Markdown
57 lines
3.0 KiB
Markdown
---
|
|
title: Envbuilder security and caching
|
|
---
|
|
|
|
> [!WARNING]
|
|
> Envbuilder is in **maintenance mode** with no new features planned.
|
|
>
|
|
> The recommended way to use dev containers in Coder is the built-in [Dev Containers Integration](../integration.md).
|
|
> To find the best approach for your deployment, join our [community](https://coder.com/community) to be guided towards the best approach.
|
|
|
|
Make sure Envbuilder can only pull pre-approved images and artifacts by configuring it with your existing HTTP proxies, firewalls, and artifact managers.
|
|
|
|
## Configure registry authentication
|
|
|
|
You might need to authenticate to your container registry, such as Artifactory, or Git provider such as GitLab, to use Envbuilder.
|
|
See the [Envbuilder documentation](https://github.com/coder/envbuilder/blob/main/docs/container-registry-auth.md) for more information.
|
|
|
|
## Layer and image caching
|
|
|
|
To improve build times, dev containers can be cached.
|
|
There are two main forms of caching:
|
|
|
|
- **Layer caching**
|
|
|
|
- Caches individual layers and pushes them to a remote registry.
|
|
When building the image, Envbuilder will check the remote registry for pre-existing layers These will be fetched and extracted to disk instead of building the layers from scratch.
|
|
|
|
- **Image caching**
|
|
|
|
- Caches the entire image, skipping the build process completely (except for post-build [lifecycle scripts](./add-envbuilder.md#dev-container-lifecycle-scripts)).
|
|
|
|
Note that caching requires push access to a registry, and might require approval from relevant infrastructure team(s).
|
|
|
|
Refer to the [Envbuilder documentation](https://github.com/coder/envbuilder/blob/main/docs/caching.md) for more information about Envbuilder and caching.
|
|
|
|
Visit the [speed up templates](../../../../workspaces/speed-up-templates.md) best practice documentation for more ways that you can speed up build times.
|
|
|
|
### Image caching
|
|
|
|
To support resuming from a cached image, use the [Envbuilder Terraform Provider](https://github.com/coder/terraform-provider-envbuilder) in your template.
|
|
The provider will:
|
|
|
|
1. Clone the remote Git repository,
|
|
1. Perform a "dry-run" build of the dev container in the same manner as Envbuilder would,
|
|
1. Check for the presence of a previously built image in the provided cache repository,
|
|
1. Output the image remote reference in SHA256 form, if it finds one.
|
|
|
|
The example templates listed above will use the provider if a remote cache repository is provided.
|
|
|
|
If you are building your own Dev container template, you can consult the [provider documentation](https://registry.terraform.io/providers/coder/envbuilder/latest/docs/resources/cached_image).
|
|
You might also wish to consult a [documented example usage of the `envbuilder_cached_image` resource](https://github.com/coder/terraform-provider-envbuilder/blob/main/examples/resources/envbuilder_cached_image/envbuilder_cached_image_resource.tf).
|
|
|
|
## Next steps
|
|
|
|
- [Envbuilder releases and known issues](./envbuilder-releases-known-issues.md)
|
|
- [Dotfiles](../../../../workspaces/workspace-dotfiles.md)
|