Skip to content
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

devcontainer support #5559

Closed
bpmct opened this issue Jan 3, 2023 · 21 comments
Closed

devcontainer support #5559

bpmct opened this issue Jan 3, 2023 · 21 comments
Assignees
Labels
roadmap https://coder.com/roadmap. Only humans may set this.

Comments

@bpmct
Copy link
Member

bpmct commented Jan 3, 2023

From the spec:

The purpose of the Development Container Specification is to provide a way to enrich containers with the content and metadata necessary to enable development inside them. These container environments should be easy to use, create, and recreate.

A development container is a container in which a user can develop an application. Tools that want to implement this specification should provide a set of features/commands that give more flexibility to users and allow development containers to scale to large development groups.

There is a neat way to use Coder with the devcontainer CLI, but it would be great if the Coder agent had first class support for running workspaces via a devcontainer.


Note: We now have docs on using our Devcontainers Alpha.

@bpmct bpmct mentioned this issue Jan 18, 2023
@kylecarbs

This comment was marked as outdated.

@ammario
Copy link
Member

ammario commented Feb 6, 2023

This feature would ease the transition from local to remote development. We should be able to implement at the terraform-level, similar to #5314.

@bpmct bpmct added the roadmap https://coder.com/roadmap. Only humans may set this. label Mar 24, 2023
@kylecarbs kylecarbs self-assigned this Apr 3, 2023
@ammario
Copy link
Member

ammario commented May 22, 2023

Per @kylecarbs, release ETA is end of next week.

@cguentherTUChemnitz
Copy link

Let me shortly describe a scenario here, where this would help alot in my eyes.

We have several projects with different tooling and setups. Vscode is able to bundle this very nicely directly in the project using .devcontainers and .vscode/settings inside every project bringing up an pre-configured environment in the same way for every developer. This approach still has the problem, that every developer needs a machine with good docker support and performance. But especially for app-development this kind-off falls apart, since we have pre-packaged android environments, but need to run for ios on baremetal macos system. MacOS seems to have crappy docker performance using docker-desktop compared to native docker support of linux, espacially when filesystem translations between host-os filesystem apfs and docker-desktop internal filesystem (e.g. ext4) comes into play (which is the case of the mapped project folder in devcontainers). So this meens at the moment, that we need 2 distinct machines for app-development per developer. One for macOS based for ios development and one for everything else, where the devcointer approach works nice.

In my eyes this problem can be more or less completely avoided, when coder runs on a baremetal linux machine and is able to open git projects in vscode with devcontainer support on project level. Then the app-developer can use just the browser accessing coder for every development task except ios dev, avoiding buy, setup and maintenance of a second machine per developer.

Is that scope of the devcontainer support idea here in coder?

@bodiroga
Copy link

bodiroga commented Jun 9, 2023

Per @kylecarbs, release ETA is end of next week.

Has there been any progress around this? 😉

@Tirzono
Copy link
Contributor

Tirzono commented Jun 29, 2023

Looks like there has been some work done in #8256 to add documentation how to work with devcontainers in templates.

@bpmct
Copy link
Member Author

bpmct commented Jun 29, 2023

Yep! You can try devcontainers + Coder today by following those docs. We're tightening our integration with GitHub to make it easier to work with private repos, which is why it is labeled as alpha but it all works today.

@bpmct
Copy link
Member Author

bpmct commented Jul 14, 2023

👋🏼 Docs for using devcontainers are here: https://coder.com/docs/v2/latest/templates/devcontainers

We plan on doing two things before we close out this issue:

  • Make it possible to "rebuild" a devcontainer from within the dashboard or VS Code
  • Improve UX from within Coder from starting a workspace from a repo (Start from a git repo #8462)

@bpmct
Copy link
Member Author

bpmct commented Jul 14, 2023

Feedback is also welcome here or on the envbuilder repo!

@Shocktrooper
Copy link

@bpmct Can we add instructions/examples on how to use devcontainers with rootless container variants like rootless podman. We want to allow for devcontainers but don't want to give user controlled pods privileged mode.

@xangelix
Copy link

are the customizations.vscode.settings and customizations.vscode.extensions fields planned to be supported?
I believe this is all that is needed for gitpod feature parity other than user-level environment variables which are unrelated to devcontainers.

@Shocktrooper
Copy link

are the customizations.vscode.settings and customizations.vscode.extensions fields planned to be supported? I believe this is all that is needed for gitpod feature parity other than user-level environment variables which are unrelated to devcontainers.

@xangelix Couldn't you just use the dotfile capability that already exists to inject user level env vars among other things?

@juanbits
Copy link

i have a selfhosted coder-oss, how i can use the devcontainers functionality?

@xangelix
Copy link

are the customizations.vscode.settings and customizations.vscode.extensions fields planned to be supported? I believe this is all that is needed for gitpod feature parity other than user-level environment variables which are unrelated to devcontainers.

@xangelix Couldn't you just use the dotfile capability that already exists to inject user level env vars among other things?

kind of, but also kind of not
a lot of the variables I'm thinking of would be user-level secrets that gitpod allows you to set in your user settings, similar to a CI/CD

afaik all of the secret management options in coder right now are not well suited to more ephemeral devcontainer/envbuilder templates

@Shocktrooper
Copy link

@xangelix If you can use a terraform datasource to grab secrets from an external system that could work. I plan to do that with hashicorp vault.

@juanbits

This comment was marked as off-topic.

@kylecarbs

This comment was marked as off-topic.

@juanbits

This comment was marked as off-topic.

@kylecarbs

This comment was marked as off-topic.

@juanbits

This comment was marked as off-topic.

@ammario
Copy link
Member

ammario commented Aug 4, 2023

Let's take the OOM discussion to #8892

@matifali matifali added this to the devcontainer support milestone Aug 4, 2023
@bpmct bpmct closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap https://coder.com/roadmap. Only humans may set this.
Projects
None yet
Development

No branches or pull requests

10 participants