Coder.comC
Coder.com•3y ago
auré

Edit template startup script

Hi everyone,
I was trying to modify the startup script of the coder agent of a template. According to the doc, i pull & decompress the template with
coder templates pull docker-code-server file.tar && tar -xf file.tar && rm file.tar

I have now the config files from the template, i edit the coder agent with :
  startup_script = <<EOT
    #!/bin/bash
    # install and start code-server
    code-server --auth none
    sudo apt update && sudo apt upgrade -y
    sudo apt install wget gcc curl -y
    wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    sudo dpkg -i packages-microsoft-prod.deb
    rm packages-microsoft-prod.deb
    sudo apt-get update && \
    sudo apt-get install -y dotnet-sdk-6.0
  EOT

Finally i push everything and i recreate a new template but nothing have change.
Any ideas ?
thanks 🙂
Was this page helpful?