| name | Develop in Docker with a dotfiles URL | ||
|---|---|---|---|
| description | Run workspaces on a Docker host using registry images | ||
| tags |
|
||
| icon | /icon/docker.png |
This is an example for deploying workspaces with a prompt for the users' dotfiles repo URI.
Run coder templates init and select this template. Follow the instructions that appear.
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
}Refer to the documentation in the Docker template.