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

Commitb0a045c

Browse files
chore: add tasks-docker first in starter templates list (#20169)
This PR:- Adds the tasks-docker template to the embeded template examples- Makes the tasks-docker template the leading template on thestarter-templates page- Makes the tasks-docker template the leading template on the featuredtemplates list (in `EmptyTemplates`)closes#19718https://github.com/user-attachments/assets/c582d8c0-a32b-48c4-886b-93a052a965a5---------Co-authored-by: Claude <noreply@anthropic.com>
1 parentf6526b7 commitb0a045c

File tree

11 files changed

+511
-35
lines changed

11 files changed

+511
-35
lines changed

‎cli/testdata/coder_templates_init_--help.golden‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USAGE:
66
Get started with a templated template.
77

88
OPTIONS:
9-
--id aws-devcontainer|aws-linux|aws-windows|azure-linux|digitalocean-linux|docker|docker-devcontainer|docker-envbuilder|gcp-devcontainer|gcp-linux|gcp-vm-container|gcp-windows|kubernetes|kubernetes-devcontainer|nomad-docker|scratch
9+
--id aws-devcontainer|aws-linux|aws-windows|azure-linux|digitalocean-linux|docker|docker-devcontainer|docker-envbuilder|gcp-devcontainer|gcp-linux|gcp-vm-container|gcp-windows|kubernetes|kubernetes-devcontainer|nomad-docker|scratch|tasks-docker
1010
Specify a given example template by ID.
1111

1212
———

‎docs/reference/cli/templates_init.md‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎examples/examples.gen.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,5 +205,19 @@
205205
"icon":"/emojis/1f4e6.png",
206206
"tags": [],
207207
"markdown":"\n# A minimal Scaffolding for a Coder Template\n\nUse this starter template as a basis to create your own unique template from scratch.\n"
208+
},
209+
{
210+
"id":"tasks-docker",
211+
"url":"",
212+
"name":"Tasks on Docker",
213+
"description":"Run Coder Tasks on Docker with an example application",
214+
"icon":"/icon/tasks.svg",
215+
"tags": [
216+
"docker",
217+
"container",
218+
"ai",
219+
"tasks"
220+
],
221+
"markdown": "\n# Run Coder Tasks on Docker\n\nThis is an example template for running [Coder Tasks](https://coder.com/docs/ai-coder/tasks), Claude Code, along with a [real world application](https://realworld-docs.netlify.app/).\n\n![Tasks](../../.images/tasks-screenshot.png)\n\nThis is a fantastic starting point for working with AI agents with Coder Tasks. Try prompts such as:\n\n- \"Make the background color blue\"\n- \"Add a dark mode\"\n- \"Rewrite the entire backend in Go\"\n\n## Included in this template\n\nThis template is designed to be an example and a reference for building other templates with Coder Tasks. You can always run Coder Tasks on different infrastructure (e.g. as on Kubernetes, VMs) and with your own GitHub repositories, MCP servers, images, etc.\n\nAdditionally, this template uses our [Claude Code](https://registry.coder.com/modules/coder/claude-code) module, but [other agents](https://registry.coder.com/modules?search=tag%3Aagent) or even [custom agents](https://coder.com/docs/ai-coder/custom-agents) can be used in its place.\n\nThis template uses a [Workspace Preset](https://coder.com/docs/admin/templates/extending-templates/parameters#workspace-presets) that pre-defines:\n\n- Universal Container Image (e.g. contains Node.js, Java, Python, Ruby, etc)\n- MCP servers (desktop-commander for long-running logs, playwright for previewing changes)\n- System prompt and [repository](https://github.com/coder-contrib/realworld-django-rest-framework-angular) for the AI agent\n- Startup script to initialize the repository and start the development server\n\n## Add this template to your Coder deployment\n\nYou can also add this template to your Coder deployment and begin tinkering right away!\n\n### Prerequisites\n\n- Coder installed (see [our docs](https://coder.com/docs/install)), ideally a Linux VM with Docker\n- Anthropic API Key (or access to Anthropic models via Bedrock or Vertex, see [Claude Code docs](https://docs.anthropic.com/en/docs/claude-code/third-party-integrations))\n- Access to a Docker socket\n - If on the local VM, ensure the `coder` user is added to the Docker group (docs)\n\n ```sh\n # Add coder user to Docker group\n sudo adduser coder docker\n \n # Restart Coder server\n sudo systemctl restart coder\n \n # Test Docker\n sudo -u coder docker ps\n ```\n\n - If on a remote VM, see the [Docker Terraform provider documentation](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs#remote-hosts) to configure a remote host\n\nTo import this template into Coder, first create a template from \"Scratch\" in the template editor.\n\nVisit this URL for your Coder deployment:\n\n```sh\nhttps://coder.example.com/templates/new?exampleId=scratch\n```\n\nAfter creating the template, paste the contents from [main.tf](https://github.com/coder/registry/blob/main/registry/coder-labs/templates/tasks-docker/main.tf) into the template editor and save.\n\nAlternatively, you can use the Coder CLI to [push the template](https://coder.com/docs/reference/cli/templates_push)\n\n```sh\n# Download the CLI\ncurl -L https://coder.com/install.sh | sh\n\n# Log in to your deployment\ncoder login https://coder.example.com\n\n# Clone the registry\ngit clone https://github.com/coder/registry\ncd registry\n\n# Navigate to this template\ncd registry/coder-labs/templates/tasks-docker\n\n# Push the template\ncoder templates push\n```\n"
208222
}
209223
]

‎examples/examples.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var (
4040
//go:embed templates/kubernetes-devcontainer
4141
//go:embed templates/nomad-docker
4242
//go:embed templates/scratch
43+
//go:embed templates/tasks-docker
4344
files embed.FS
4445

4546
exampleBasePath="https://github.com/coder/coder/tree/main/examples/templates/"
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
display_name:Tasks on Docker
3+
description:Run Coder Tasks on Docker with an example application
4+
icon:../../../site/static/icon/tasks.svg
5+
verified:false
6+
tags:[docker, container, ai, tasks]
7+
maintainer_github:coder
8+
---
9+
10+
#Run Coder Tasks on Docker
11+
12+
This is an example template for running[Coder Tasks](https://coder.com/docs/ai-coder/tasks), Claude Code, along with a[real world application](https://realworld-docs.netlify.app/).
13+
14+
![Tasks](../../.images/tasks-screenshot.png)
15+
16+
This is a fantastic starting point for working with AI agents with Coder Tasks. Try prompts such as:
17+
18+
- "Make the background color blue"
19+
- "Add a dark mode"
20+
- "Rewrite the entire backend in Go"
21+
22+
##Included in this template
23+
24+
This template is designed to be an example and a reference for building other templates with Coder Tasks. You can always run Coder Tasks on different infrastructure (e.g. as on Kubernetes, VMs) and with your own GitHub repositories, MCP servers, images, etc.
25+
26+
Additionally, this template uses our[Claude Code](https://registry.coder.com/modules/coder/claude-code) module, but[other agents](https://registry.coder.com/modules?search=tag%3Aagent) or even[custom agents](https://coder.com/docs/ai-coder/custom-agents) can be used in its place.
27+
28+
This template uses a[Workspace Preset](https://coder.com/docs/admin/templates/extending-templates/parameters#workspace-presets) that pre-defines:
29+
30+
- Universal Container Image (e.g. contains Node.js, Java, Python, Ruby, etc)
31+
- MCP servers (desktop-commander for long-running logs, playwright for previewing changes)
32+
- System prompt and[repository](https://github.com/coder-contrib/realworld-django-rest-framework-angular) for the AI agent
33+
- Startup script to initialize the repository and start the development server
34+
35+
##Add this template to your Coder deployment
36+
37+
You can also add this template to your Coder deployment and begin tinkering right away!
38+
39+
###Prerequisites
40+
41+
- Coder installed (see[our docs](https://coder.com/docs/install)), ideally a Linux VM with Docker
42+
- Anthropic API Key (or access to Anthropic models via Bedrock or Vertex, see[Claude Code docs](https://docs.anthropic.com/en/docs/claude-code/third-party-integrations))
43+
- Access to a Docker socket
44+
- If on the local VM, ensure the`coder` user is added to the Docker group (docs)
45+
46+
```sh
47+
# Add coder user to Docker group
48+
sudo adduser coder docker
49+
50+
# Restart Coder server
51+
sudo systemctl restart coder
52+
53+
# Test Docker
54+
sudo -u coder docker ps
55+
```
56+
57+
- If on a remote VM, see the [Docker Terraform provider documentation](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs#remote-hosts) to configure a remote host
58+
59+
To import this template into Coder, first create a template from"Scratch"in the template editor.
60+
61+
Visit this URLfor your Coder deployment:
62+
63+
```sh
64+
https://coder.example.com/templates/new?exampleId=scratch
65+
```
66+
67+
After creating the template, paste the contents from [main.tf](https://github.com/coder/registry/blob/main/registry/coder-labs/templates/tasks-docker/main.tf) into the template editor and save.
68+
69+
Alternatively, you can use the Coder CLI to [push the template](https://coder.com/docs/reference/cli/templates_push)
70+
71+
```sh
72+
# Download the CLI
73+
curl -L https://coder.com/install.sh| sh
74+
75+
# Log in to your deployment
76+
coder login https://coder.example.com
77+
78+
# Clone the registry
79+
git clone https://github.com/coder/registry
80+
cd registry
81+
82+
# Navigate to this template
83+
cd registry/coder-labs/templates/tasks-docker
84+
85+
# Push the template
86+
coder templates push
87+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp