Skip to content

Epic: Support devcontainer.json #7721

Open
@svenefftinge

Description

@svenefftinge

Given VS Code's and GitHub's dominance in the developer world, VS Code's devcontainer.json format is going to become a quasi-standard eventually. Supporting it will allow us to lower the entry barrier for teams who already use it so they can easily spin up their dev environments in Gitpod and experience the speed (startup time, prebuilds) and efficiency (lower cost) of our product.

Activity

ntziolis

ntziolis commented on Sep 20, 2021

@ntziolis

This would be a welcome addition, we currently make heavy use of the docker-compose based vscode devcontainer feature. And had to adjust our setups significantly to ensure we don't have duplication between lokal devcontainer and gitpod setups. This wasn't straight forward as in gitpod docker-compose needs to be called separately from starting the development container where in vscode the devcontainer is part of the docker compose file.

We are happy to provide some insights how we have ensured that we are sharing the same compose file across vscode and gitpod. What we could not circumvent is having seperate Dockerfiles for the devcontainers as vscode and gitpod use different base images. To reduce duplication we have extracted the setup steps into scripts that are copied into and executed during image creation of the devcontainer. That said I think there is room for tooling that does this for you.

Note:
Our devs were very clear that while they love gitpod they absolutely wane be able to start a project in a local devcontainer as well if needed.

jeluard

jeluard commented on Sep 30, 2021

@jeluard

@svenefftinge Would this be an openvscode-server level feature of gitpod one?

jorroll

jorroll commented on Oct 13, 2021

@jorroll

Just to pile on, one benefit of the .devcontainer.json specification is that it operates the same way locally as in other places (e.g. Gitpod). I've used devcontainers for a while now (years? not sure) because I find them easier than tools like nvm and I like being able to provide a convenient onboarding experience for my open source projects. I'm just checking out Gitpod (for the second time, actually) and looking at the .gitpod.yml format (which seems nice as well) but I realize that, in order to port my devcontainer.json config over to the gitpod format, it doesn't look like I can easily test .gitpod.yml locally in VS Code. It looks like I'll need to try a config, spin up a gitpod instance, tweak settings, spin up another gitpod instance, etc. Not great.

As a new user to Gitpod, I don't expect I'll want to jump whole-hog into coding online. I expect my default will still be just coding on my personal machine inside a devcontainer. I like the option of being able to use Gitpod when on someone else's computer though (such as a work computer) which happens somewhat often (it also seems nice for my open source projects). Because of this, having one standard config that works the same across environments is definitely a feature I appreciate.

Edit (2/5/22):
FWIW, after running into this issue I ended up losing interest in Gitpod and not pursuing it further. Never ended up getting .gitpod.yml working.

CarlosDomingues

CarlosDomingues commented on Oct 21, 2021

@CarlosDomingues

Our company has been using .devcontainer / .devcontainer.json for a few years so we can have reproducible dev environments.

If we could use those with Gitpod, migration would be trivial.

Also, as @jorroll mentioned, the fact that .devcontainer.json also works locally makes it very powerful for testing dev environments in fast iterations.

Maybe it's because I'm still learning, but I've found the process of trying stuff in .gitpod.yml quite slow and time consuming.

bigint

bigint commented on Oct 27, 2021

@bigint

I need this badly 🙏🏻 after seeing the today's GH universe 😄

ntindle

ntindle commented on Nov 10, 2021

@ntindle

+1 on this, my projects are tied to .devcontainer format

sdepablos

sdepablos commented on Nov 19, 2021

@sdepablos

Another +1, it would make the transition to Gitpod way easier

0Grit

0Grit commented on Nov 19, 2021

@0Grit

Heck, even if I still had to specify in .gitpod.yml which .devcontainer.json to use. I don't mind reminding myself whose product I'm using.

Be nice if there was some open governed group maintaining standards like these for devtools...

svenefftinge

svenefftinge commented on Nov 26, 2021

@svenefftinge
MemberAuthor

See #6922

liflovs

liflovs commented on Dec 12, 2021

@liflovs

Nice that you guys already scheduled it, I`m introducing devcontainers into our team's culture, but its still a task to set them up and make sure they work stable.
Having gitpod support it will allow to boost cooperation with our short-time freelance devs.

transferred this issue fromon Jan 20, 2022
jessitron

jessitron commented on Jan 21, 2022

@jessitron

As a new user, it completely shocked me that gitpod opens VSCode but does not use VSCode devcontainer configuration. It took me a lot of googling until I found this issue, and then I was like "What??"

This may be a showstopper, if pointing gitpod.yml to .devcontainer/Dockerfile doesn't work. (edit: it did)

blieusong

blieusong commented on Jan 26, 2022

@blieusong

Exactly as per @jessitron jessitron. Impressed at first, but felt let down next, after realising that nothing in the .devcontainer folder of the project wasn't taken into account.

It probably is best not to have too many files format to do the same thing, and I'm afraid devcontainer will become a de facto standard instead of the .gitpod.yml, so might as well focus on that.

56 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @shaal@mbrevoort@ghuntley@sdepablos@ntziolis

      Issue actions

        Epic: Support `devcontainer.json` · Issue #7721 · gitpod-io/gitpod