Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support Coder-specific Devcontainer customizations #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
johnstcn opened this issue Mar 3, 2025 · 2 comments
Open

Support Coder-specific Devcontainer customizations #450

johnstcn opened this issue Mar 3, 2025 · 2 comments
Assignees

Comments

@johnstcn
Copy link
Member

johnstcn commented Mar 3, 2025

Problem

In order to allow the full coder_app experience with applications running inside a devcontainer, we need to allow decoupling coder_apps from the template. Currently a coder_app is only defined inside the template.

Proposed Solution

Allow devcontainers to declare a subset of the coder_app spec inside customizations.coder. This can then be read by the agent and used to dynamically create / update coder_apps for the workspace agent.

For example:

{
  [...]
  "customizations": {
    "coder": { // or maybe `com.coder.coder` instead?
      "apps": [
        { // we can basically allow the entire coder_app spec in here, within reason
          "slug": "code-server",
          "display_name": "Code Server inside your Devcontainer!",
          "url": 13337,
          "icon": "/icon/code.svg",
          "share": "owner",
          "healthcheck": { [.. ] }
        }
      ]
    }
  }
}
@johnstcn
Copy link
Member Author

johnstcn commented Mar 7, 2025

As far as I can tell, the entire coder_app spec will be useful here (except for agent_id; this will be implicit from the CODER_AGENT_TOKEN).
https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app

@DanielleMaywood DanielleMaywood self-assigned this Apr 9, 2025
@defelmnq defelmnq assigned defelmnq and unassigned DanielleMaywood Apr 9, 2025
@defelmnq
Copy link

defelmnq commented May 6, 2025

After internal discussion and working on a PoC - here's a status update :

With the current project status, achieving this ticket would :

  • require an update on the AgentAPI to create new calls and send the applications defined in the devcontainers.json file.
  • require to insert these apps in DB after the devcontainer up step.

In the meantime, we are working on devcontainers agent that will give us a better visibility and :

  • let us rely on agent lifecycle to refresh apps
  • know about which port are being used internally for each app
  • have different AgentAPI calls - with different payload

As we know this one will not be part of the May release, but also the devcontainers agent RFC is moving well - does it make sense to continue to focus on a first version that will at best have to be erased, at worst be changed even before being released ? Considering also the pain to update the AgentAPI and the compatibility we have to keep.

cc @mtojek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants