This PR: - Adds the tasks-docker template to the embeded template examples - Makes the tasks-docker template the leading template on the starter-templates page - Makes the tasks-docker template the leading template on the featured templates list (in `EmptyTemplates`) closes https://github.com/coder/coder/issues/19718 https://github.com/user-attachments/assets/c582d8c0-a32b-48c4-886b-93a052a965a5 --------- Co-authored-by: Claude <noreply@anthropic.com>
3.5 KiB
display_name, description, icon, verified, tags, maintainer_github
| display_name | description | icon | verified | tags | maintainer_github | ||||
|---|---|---|---|---|---|---|---|---|---|
| Tasks on Docker | Run Coder Tasks on Docker with an example application | ../../../site/static/icon/tasks.svg | false |
|
coder |
Run Coder Tasks on Docker
This is an example template for running Coder Tasks, Claude Code, along with a real world application.
This is a fantastic starting point for working with AI agents with Coder Tasks. Try prompts such as:
- "Make the background color blue"
- "Add a dark mode"
- "Rewrite the entire backend in Go"
Included in this template
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.
Additionally, this template uses our Claude Code module, but other agents or even custom agents can be used in its place.
This template uses a Workspace Preset that pre-defines:
- Universal Container Image (e.g. contains Node.js, Java, Python, Ruby, etc)
- MCP servers (desktop-commander for long-running logs, playwright for previewing changes)
- System prompt and repository for the AI agent
- Startup script to initialize the repository and start the development server
Add this template to your Coder deployment
You can also add this template to your Coder deployment and begin tinkering right away!
Prerequisites
- Coder installed (see our docs), ideally a Linux VM with Docker
- Anthropic API Key (or access to Anthropic models via Bedrock or Vertex, see Claude Code docs)
- Access to a Docker socket
-
If on the local VM, ensure the
coderuser is added to the Docker group (docs)# Add coder user to Docker group sudo adduser coder docker # Restart Coder server sudo systemctl restart coder # Test Docker sudo -u coder docker ps -
If on a remote VM, see the Docker Terraform provider documentation to configure a remote host
-
To import this template into Coder, first create a template from "Scratch" in the template editor.
Visit this URL for your Coder deployment:
https://coder.example.com/templates/new?exampleId=scratch
After creating the template, paste the contents from main.tf into the template editor and save.
Alternatively, you can use the Coder CLI to push the template
# Download the CLI
curl -L https://coder.com/install.sh | sh
# Log in to your deployment
coder login https://coder.example.com
# Clone the registry
git clone https://github.com/coder/registry
cd registry
# Navigate to this template
cd registry/coder-labs/templates/tasks-docker
# Push the template
coder templates push
