Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
EdwardAngert merged 39 commits intomainfrombp-dev-containers
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
39 commits
Select commitHold shift + click to select a range
d741460
add definitions to admin/index
EdwardAngertNov 8, 2024
3ed5c3e
init devcontainers best practice doc
EdwardAngertNov 8, 2024
dcf901c
s/definition list/bullets
EdwardAngertNov 8, 2024
16cce07
Merge remote-tracking branch 'origin' into bp-dev-containers
EdwardAngertNov 12, 2024
e96b1bc
admin/index glossary section
EdwardAngertNov 13, 2024
22e399d
when to use a dev container
EdwardAngertNov 13, 2024
4f91cd0
Merge remote-tracking branch 'origin' into bp-dev-containers
EdwardAngertNov 13, 2024
8e37e58
admin/index glossary; devcontainer known issues
EdwardAngertNov 13, 2024
985233a
devcontainer lifecycle scripts
EdwardAngertNov 13, 2024
f2c59be
devcontainers directory
EdwardAngertNov 13, 2024
b24f615
fix typo
EdwardAngertNov 13, 2024
4c28411
make fmt
EdwardAngertNov 13, 2024
fc20dc3
suggestions from review
EdwardAngertNov 20, 2024
197cfa7
add steps in tabs to add-devcontainer
EdwardAngertNov 20, 2024
5a93ff2
fix links; list templates
EdwardAngertNov 20, 2024
8e53735
make fmt + copy review addition
EdwardAngertNov 20, 2024
80bf5da
fix link
EdwardAngertNov 21, 2024
ca56186
typo fix
EdwardAngertNov 21, 2024
1491680
copy edit devcontainer/index
EdwardAngertNov 21, 2024
7f8b079
edit add-devcontainer
EdwardAngertNov 22, 2024
547cfe0
Apply suggestions from code review
EdwardAngertNov 22, 2024
d22f76f
add screenshot
EdwardAngertNov 22, 2024
ce0d2be
make fmt; copy tweaks
EdwardAngertNov 22, 2024
66fcca0
edit example
EdwardAngertNov 22, 2024
de58159
link typo
EdwardAngertNov 22, 2024
69415d4
adjust image size
EdwardAngertNov 22, 2024
ae543de
Apply suggestions from code review
EdwardAngertNov 25, 2024
ca0da6d
Apply suggestions from code review
EdwardAngertNov 25, 2024
381bb73
make fmt
EdwardAngertNov 25, 2024
ade54e9
close codeblock; edit starter template steps
EdwardAngertNov 25, 2024
e46fc13
code review
Nov 26, 2024
9982af4
make fmt
Nov 26, 2024
182d69a
rename to dev containers
Nov 26, 2024
bf2e0fa
2-col table
EdwardAngertNov 26, 2024
cd99937
make fmt
Nov 26, 2024
d17dbea
un-double bullet def list
Nov 26, 2024
2c3ca6d
s/devcontainer/dev container
Nov 26, 2024
c28f16d
comma typo
Nov 26, 2024
f344dff
Merge remote-tracking branch 'origin' into bp-dev-containers
Nov 27, 2024
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
PrevPrevious commit
NextNext commit
add steps in tabs to add-devcontainer
  • Loading branch information
@EdwardAngert
EdwardAngert committedNov 20, 2024
commit197cfa748576876d5ebd4c07b5be3d5305a7341d
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,80 @@
# Add adevcontainer template to Coder
# Add adev container template to Coder

A Coder administrator adds adevcontainer-compatible template to Coder
A Coder administrator adds adev container-compatible template to Coder
(Envbuilder).

When a developer creates their workspace, they enter their repository URL as a
[parameter](../../extending-templates/parameters.md). Envbuilder clones the repo
and builds a container from the `devcontainer.json` specified in the repo.

//tabs UI | CLI | Registry (/starter-templates?tag=devcontainer)

<div class="tabs">

## Dashboard

1. In the Coder dashboard, select **Templates** then **Create Template**.
1. To use a [starter template](https://github.com/coder/coder/tree/main/examples/templates), select **Choose a starter template**.
- Select **From scratch** to create a new template and enter information and file contents manually.

## CLI

1. Use the `template init` command to initialize your choice of image:

```shell
coder template init --id devcontainer-kubernetes
```

1. `cd` into the directory and push the template to your Coder deployment:

```shell
cd $_ && coder templates push
```

You can also edit the files or make changes to the files before you push them to Coder.

## Registry

1. Go to the [Coder Registry](https://registry.coder.com/templates?tag=devcontainer) and select a dev container-compatible template.

1. Copy the files to your local device, then edit them to fit your needs.

1. Upload them to Coder through the CLI or dashboard:

- CLI:

```shell
coder template push
```

- Dashboard:

1. Create a `.zip` of the template files:

- On Mac or Windows, highlight the files and then right click. A "compress" option is available through the right-click context menu.

- To zip the files through the command line:

```shell
zip templates.zip Dockerfile main.tf
```

1. Select **Templates**.
1. Select **Create Template**, then **Upload template**:

![Upload template](../../../../images/admin/templates/upload-create-your-first-template.png)

1. Drag the `.zip` file into the **Upload template** section and fill out the details, then select **Create template**.

![Upload the template files](../images/templates/upload-create-template-form.png)

1. Once the upload completes, select **Templates** from the top to deploy it to a new workspace.

</div>

Admin:

1. Use a [devcontainer template](https://registry.coder.com/templates)
1. Use a [dev container template](https://registry.coder.com/templates)
1. Create a template with the template files from the registry (git clone,
upload files, or copy paste)
1. In template settings > variables > set necessary variables such as the
Expand DownExpand Up@@ -47,25 +112,25 @@

## Example templates

- [Dockerdevcontainers](https://github.com/coder/coder/tree/main/examples/templates/devcontainer-docker)
- [Dockerdev containers](https://github.com/coder/coder/tree/main/examples/templates/devcontainer-docker)
- Docker provisions a development container.
- [Kubernetesdevcontainers](https://github.com/coder/coder/tree/main/examples/templates/devcontainer-kubernetes)
- [Kubernetesdev ontainers](https://github.com/coder/coder/tree/main/examples/templates/devcontainer-kubernetes)

Check warning on line 117 in docs/admin/templates/managing-templates/devcontainers/add-devcontainer.md

View workflow job for this annotation

GitHub Actions/ lint

"ontainers" should be "containers".
- Provisions a development container on the Kubernetes.
- [Google Compute Enginedevcontainer](https://github.com/coder/coder/tree/main/examples/templates/gcp-devcontainer)
- [Google Compute Enginedev container](https://github.com/coder/coder/tree/main/examples/templates/gcp-devcontainer)
- Runs a development container inside a single GCP instance. It also mounts
the Docker socket from the VM inside the container to enable Docker inside
the workspace.
- [AWS EC2devcontainer](https://github.com/coder/coder/tree/main/examples/templates/aws-devcontainer)
- [AWS EC2dev container](https://github.com/coder/coder/tree/main/examples/templates/aws-devcontainer)
- Runs a development container inside a single EC2 instance. It also mounts
the Docker socket from the VM inside the container to enable Docker inside
the workspace.

Your template can prompt the user for a repo URL with
[parameters](../../extending-templates/parameters.md):

![Devcontainer parameter screen](../../../../images/templates/devcontainers.png)
![Dev container parameter screen](../../../../images/templates/devcontainers.png)

##Devcontainer lifecycle scripts
##Dev container lifecycle scripts

The `onCreateCommand`, `updateContentCommand`, `postCreateCommand`, and
`postStartCommand` lifecycle scripts are run each time the container is started.
Expand All@@ -76,4 +141,4 @@

## Next steps

- [Devcontainer security and caching](./devcontainer-security-caching.md)
- [Dev container security and caching](./devcontainer-security-caching.md)
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
#Devcontainer releases and known issues
#Dev container releases and known issues

## Release channels

Expand All@@ -20,29 +20,6 @@ information and to submit feature requests or bug reports.

## Known issues

- Image caching: error pushing image

- `BLOB_UNKNOWN: Manifest references unknown blob(s)`
- [Issue 385](https://github.com/coder/envbuilder/issues/385)

- Support for VS Code Extensions requires a workaround.

- [Issue 68](https://github.com/coder/envbuilder/issues/68#issuecomment-1805974271)

- Envbuilder does not support Volume Mounts

- Support for lifecycle hooks is limited.
([Issue](https://github.com/coder/envbuilder/issues/395))
- Supported:
- `onCreateCommand`
- `updateContentCommand`
- `postCreateCommand`
- `postStartCommand`
- Not supported:
- `initializeCommand`
- `postAttachCommand`
- `waitFor`

Visit the
[Envbuilder repository](https://github.com/coder/envbuilder/blob/main/docs/devcontainer-spec-support.md)
for a full list of supported features and known issues.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
#Devcontainer security and caching
#Dev container security and caching

Ensure Envbuilder can only pull images and artifacts by configuring it with your
existing HTTP proxies, firewalls, and artifact managers.
Expand DownExpand Up@@ -47,7 +47,7 @@ To support resuming from a cached image, use the
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
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,
Expand All@@ -56,12 +56,12 @@ in your template. The provider will:
The example templates listed above will use the provider if a remote cache
repository is provided.

If you are building your ownDevcontainer template, you can consult the
If you are building your ownDev container template, you can consult the
[provider documentation](https://registry.terraform.io/providers/coder/envbuilder/latest/docs/resources/cached_image).
You may 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

- [Devcontainer releases and known issues](./devcontainer-releases-known-issues.md)
- [Dev container releases and known issues](./devcontainer-releases-known-issues.md)
- [Dotfiles](../../../../user-guides/workspace-dotfiles.md)
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
# Development containers on Coder
# Development containers

A Development Container is an
[open source specification](https://containers.dev/implementors/spec/) for
Expand Down
16 changes: 8 additions & 8 deletionsdocs/manifest.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -321,23 +321,23 @@
"path": "./admin/templates/managing-templates/change-management.md"
},
{
"title": "Development containers on Coder",
"description": "Learn about usingdevcontainers in templates",
"title": "Development containers",
"description": "Learn about usingdev containers in templates",
"path": "./admin/templates/managing-templates/devcontainers/index.md",
"children": [
{
"title": "Add adevcontainer template",
"description": "How to add adevcontainer template to Coder",
"title": "Add adev container template",
"description": "How to add adev container template to Coder",
"path": "./admin/templates/managing-templates/devcontainers/add-devcontainer.md"
},
{
"title": "Devcontainer security and caching",
"description": "Configuredevcontainer authentication and caching",
"title": "Dev container security and caching",
"description": "Configuredev container authentication and caching",
"path": "./admin/templates/managing-templates/devcontainers/devcontainer-security-caching.md"
},
{
"title": "Devcontainer releases and known issues",
"description": "Devcontainer releases and known issues",
"title": "Dev container releases and known issues",
"description": "Dev container releases and known issues",
"path": "./admin/templates/managing-templates/devcontainers/devcontainer-releases-known-issues.md"
}
]
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp