- Notifications
You must be signed in to change notification settings - Fork1.1k
docs: improve dev containers documentation for user start-up#15458
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
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
39 commits Select commitHold shift + click to select a range
d741460 add definitions to admin/index
EdwardAngert3ed5c3e init devcontainers best practice doc
EdwardAngertdcf901c s/definition list/bullets
EdwardAngert16cce07 Merge remote-tracking branch 'origin' into bp-dev-containers
EdwardAngerte96b1bc admin/index glossary section
EdwardAngert22e399d when to use a dev container
EdwardAngert4f91cd0 Merge remote-tracking branch 'origin' into bp-dev-containers
EdwardAngert8e37e58 admin/index glossary; devcontainer known issues
EdwardAngert985233a devcontainer lifecycle scripts
EdwardAngertf2c59be devcontainers directory
EdwardAngertb24f615 fix typo
EdwardAngert4c28411 make fmt
EdwardAngertfc20dc3 suggestions from review
EdwardAngert197cfa7 add steps in tabs to add-devcontainer
EdwardAngert5a93ff2 fix links; list templates
EdwardAngert8e53735 make fmt + copy review addition
EdwardAngert80bf5da fix link
EdwardAngertca56186 typo fix
EdwardAngert1491680 copy edit devcontainer/index
EdwardAngert7f8b079 edit add-devcontainer
EdwardAngert547cfe0 Apply suggestions from code review
EdwardAngertd22f76f add screenshot
EdwardAngertce0d2be make fmt; copy tweaks
EdwardAngert66fcca0 edit example
EdwardAngertde58159 link typo
EdwardAngert69415d4 adjust image size
EdwardAngertae543de Apply suggestions from code review
EdwardAngertca0da6d Apply suggestions from code review
EdwardAngert381bb73 make fmt
EdwardAngertade54e9 close codeblock; edit starter template steps
EdwardAngerte46fc13 code review
9982af4 make fmt
182d69a rename to dev containers
bf2e0fa 2-col table
EdwardAngertcd99937 make fmt
d17dbea un-double bullet def list
2c3ca6d s/devcontainer/dev container
c28f16d comma typo
f344dff Merge remote-tracking branch 'origin' into bp-dev-containers
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
suggestions from review
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitfc20dc3e981ff18ff45651b4c51a4355e92e5087
There are no files selected for viewing
89 changes: 61 additions & 28 deletionsdocs/admin/templates/managing-templates/devcontainers/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,53 @@ | ||
| # Development containers on Coder | ||
| ADevelopment Container is an | ||
| [open source specification](https://containers.dev/implementors/spec/) for | ||
| defining containerized development environments which are also called | ||
| development containers (dev containers). | ||
| Use dev containers with Coder to give developers more autonomy and control over | ||
| their environments while adding cloud-native security to standard ticket and | ||
| approval workflows for increased self-service. | ||
| ## Prerequisites | ||
| A developer team should configure dev containers after an administrator | ||
| constructs or chooses a base image and creates a template that includes a | ||
| `devcontainer_builder` image. | ||
| ## Benefits of devcontainers | ||
| There are several benefits to adding adev container-compatible template to | ||
| Coder: | ||
| - Reliability through standardization | ||
| - Scalability for growing teams | ||
| - Improved security | ||
| - Performance efficiency | ||
| - Cost Optimization | ||
| ### Reliability through standardization | ||
| Use dev containers to empower development teams to personalize their own | ||
| environments while maintaining consistency and security through an approved and | ||
| hardened base image. Standardized environments ensure uniform behavior across | ||
| machines and team members, eliminating "it works on my machine" issues and | ||
| creating a stable foundation for development and testing. Containerized setups | ||
| reduce dependency conflicts and misconfigurations, enhancing build stability. | ||
| ### Scalability for growing teams | ||
| Dev containers allow organizations to handle multiple projects and teams | ||
| efficiently. | ||
| You can leverage platforms like Kubernetes to allocate resources on demand, | ||
| optimizing costs and ensuring fair distribution of quotas. Developer teams can | ||
| use efficient custom images and independently configure the contents of their | ||
| version-controlled dev containers. | ||
| This approach allows organizations to scale seamlessly, reducing the maintenance | ||
| burden on the administrators that support diverse projects while allowing | ||
| development teams to maintain their own images and onboard new users quickly. | ||
| ### Improved security | ||
| @@ -34,7 +58,12 @@ Additionally, Envbuilder can be configured to push the full image back to your | ||
| registry for additional security scanning. | ||
| This means that Coder admins can still require hardened base images and | ||
| packages, while still allowing developer self-service. | ||
| Envbuilder runs inside a small container image but does not require a Docker | ||
| daemon in order to build a dev container. This is useful in environments where | ||
| you may not have access to a Docker socket for security reasons, but still need | ||
| to work with a container. | ||
| ### Performance efficiency | ||
| @@ -53,30 +82,34 @@ image caching ensures optimal start and stop times. | ||
| ## When to use a dev container | ||
| Dev containers are a good fit for developer teams who are familiar with Docker | ||
| and are already using containerized development environments. If you have a | ||
| large number of projects with different toolchains, dependencies, or that depend | ||
| on a particular Linux distribution, dev containers make it easier to quickly | ||
| switch between projects. | ||
| They may also be a great fit for more restricted environments where you may not | ||
| have access to a Docker daemon since it doesn't need one to work. | ||
| ## Devcontainer Features | ||
| [Dev container Features](https://containers.dev/implementors/features/) allow | ||
| owners of a project to specify self-contained units of code and runtime | ||
| configuration that can be composed together on top of an existing base image. | ||
| This is a good place to install project-specific tools, such as | ||
| language-specific runtimes and compilers. | ||
| ## Coder Envbuilder | ||
| Envbuilder is an open-source project maintained by Coder that runs dev | ||
EdwardAngert marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| containers via Coder templates and your underlying infrastructure. Envbuilder | ||
| can run on Docker or Kubernetes. | ||
| It is independently packaged and versioned from the centralized Coder | ||
| open-source project. This means that Envbuilder can be used with Coder, but it | ||
| is not required. It also means that dev container builds can scale independently | ||
| of the Coder control plane and even run within a CI/CD pipeline. | ||
| ## Next steps | ||
| - [Add a devcontainer template](./add-devcontainer.md) | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.