mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
* fix: Reduce variables needed for Docker template This should make initial setup a bit simpler! * Fix for M2 Macbooks PostgreSQL 13 doesn't support the M series architecture. * Fix name <-> id swap * Update Docker provider to remove host requirement Co-authored-by: Kyle Carberry <kyle@air.local>
name, description, tags
| name | description | tags | ||
|---|---|---|---|---|
| Develop in Docker with a dotfiles URL | Run workspaces on a Docker host using registry images |
|
docker-with-dotfiles
This is an example for deploying workspaces with a prompt for the users' dotfiles repo URI.
Getting started
Run coder templates init and select this template. Follow the instructions that appear.
How it works
During workspace creation, Coder prompts you to specify a dotfiles URL via a Terraform variable. Once the workspace starts, the Coder agent runs coder dotfiles via the startup script:
variable "dotfiles_uri" {
description = <<-EOF
Dotfiles repo URI (optional)
see https://dotfiles.github.io
EOF
# The codercom/enterprise-* images are only built for amd64
default = ""
}
resource "coder_agent" "main" {
...
startup_script = var.dotfiles_uri != "" ? "/tmp/tmp.coder*/coder dotfiles -y ${var.dotfiles_uri}" : null
}
Managing images and workspaces
Refer to the documentation in the Docker template.