Files
coder/examples/templates/docker-with-dotfiles
Muhammad Atif AliandBen Potter 114d4aac23 chore: update example templates to use display_name (#7001)
* add `display_name`

* fix typos and `terraform validate`

* update display_name

* Update examples/templates/aws-windows/main.tf

Co-authored-by: Ben Potter <me@bpmct.net>

* Update examples/templates/aws-linux/main.tf

Co-authored-by: Ben Potter <me@bpmct.net>

* Update examples/templates/azure-linux/main.tf

Co-authored-by: Ben Potter <me@bpmct.net>

* Update examples/templates/azure-linux/main.tf

Co-authored-by: Ben Potter <me@bpmct.net>

* Update examples/templates/do-linux/main.tf

Co-authored-by: Ben Potter <me@bpmct.net>

* Update examples/templates/do-linux/main.tf

Co-authored-by: Ben Potter <me@bpmct.net>

* Update main.tf

* Update main.tf

* Update main.tf

* Update main.tf

* Update main.tf

---------

Co-authored-by: Ben Potter <me@bpmct.net>
2023-04-12 16:33:38 -05:00
..

name, description, tags, icon
name description tags icon
Develop in Docker with a dotfiles URL Run workspaces on a Docker host using registry images
local
docker
/icon/docker.png

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.