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 VM Templates #10735

Closed
2 of 3 tasks
bpmct opened this issue Nov 16, 2023 · 8 comments
Closed
2 of 3 tasks

Devcontainer VM Templates #10735

bpmct opened this issue Nov 16, 2023 · 8 comments
Labels
feature Something we don't have yet

Comments

@bpmct
Copy link
Member

bpmct commented Nov 16, 2023

This is simular to architecture of other CDE platforms, a single VM which runs a container!

@cdr-bot cdr-bot bot added the feature Something we don't have yet label Nov 16, 2023
@matifali
Copy link
Collaborator

That would be useful. We may use it for implementing #8462 too.

@matifali matifali self-assigned this Nov 16, 2023
@matifali
Copy link
Collaborator

I am taking this one.

@ggjulio
Copy link
Contributor

ggjulio commented Feb 2, 2024

Nice templates.

Does envbuilder works fine with theses two devcontainer features inside the VM ?

If it works, could we add automatically the docker-in-docker feature by default in the devcontainer ?

Why ?

It ease the developer's life, no need to explicity add the feature in the devcontainer.json

Why docker-in-docker and not docker-outside-docker ?

When using docker-in-docker, docker ps will only show containers that has been started within the devcontainer.
Which is more user friendly than docker-outside-docker as it hides the devcontainer itself.

It works by running a new docker daemon inside the current container.
However /var/lib/docker must be bind mounted in order to run a new dockerd.
The bind mount is directly defined in the docker-in-docker feature.
image

So if envbuilder implements this part of the devcontainer spec, it should work out of the box.


The dind hack implementation is here if needed :

@matifali
Copy link
Collaborator

matifali commented Feb 2, 2024

@ggjulio not at the moment. Please see

@matifali
Copy link
Collaborator

matifali commented Feb 2, 2024

@kylecarbs can we make docker work inside devcontainer built by the envbuilder?
Or at least make the host docker docker available.

@ggjulio
Copy link
Contributor

ggjulio commented Feb 2, 2024

@matifali thanks for the answer !

I forgot to mention this option of docker-in-docker feature:
image

It seem to be an hack to make DNS works fine for codespaces (They use azure)

image

sources:

So envbuilder + dind may work fine on Azure, but probably not completely on other cloud providers.
In that case a PR to update the docker-in-docker feature could be needed.

@ggjulio
Copy link
Contributor

ggjulio commented Feb 2, 2024

Is it acceptable to use the devcontainer cli instead of envbuilder for VM templates ?

I know the devcontainer cli is not perfect... and require node to be installed.
Which add up to the initial provisioning time.

But the devcontainer cli could be a first step for supporting the dind feature on coder platform.

@matifali
Copy link
Collaborator

matifali commented Feb 2, 2024

@ggjulio, you can use whatever you wish to create a custom template. envbuilder is mainly focused on building an image from devcontainer spec to be run in Kubernetes workspaces.

@matifali matifali removed their assignment Mar 28, 2024
@bpmct bpmct closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something we don't have yet
Projects
None yet
Development

No branches or pull requests

3 participants