Skip to content

Terminals via Docker containers #190

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

Closed
PhilsLab opened this issue Mar 10, 2019 · 8 comments
Closed

Terminals via Docker containers #190

PhilsLab opened this issue Mar 10, 2019 · 8 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@PhilsLab
Copy link

From my point of view, having the terminals access the host machine is a big downside when it comes to security and tooling.

Adding docker (or even Kubernetes) support would help making terminals and maybe also debugging a lot nicer. For each project there could be a settings file which determines which docker image to run in a terminal.

Quick example to make this more understandable:
Imagine opening a NodeJS project, with the following file added:
.code-server/settings.json

{
    "terminal.dockerImage": "node:10-slim"
}

Now, launching a terminal would automatically spin up a new docker container, attaching to a pseudo-terminal, and bind-mounting the current project directory into it.
For bare metal installations, this would work by running code-server with a user that has permissions to access the docker socket at /var/run/docker.sock. For the code-server docker image, you would have to bind mount the socket to the container, and access it from there: docker run -v /var/run/docker.sock:/var/run/docker.sock [...] codercom/code-server

It would also be nice to have a seperate command/modal called "New terminal" which prompts you to enter a docker image name, and saves the most frequently used ones.

@PhilsLab PhilsLab added the enhancement Some improvement that isn't a feature label Mar 10, 2019
@sr229
Copy link
Contributor

sr229 commented Mar 11, 2019

This should be opt in. Some people won't be using this feature since some of them might want access to the same environment the server runs, but overall, this is a nice feature since it allows more isolation.

@ezrizhu
Copy link
Contributor

ezrizhu commented Mar 11, 2019

This should be opt in.
I agree, some people already run it in a docker container,

@jeasonstudio
Copy link
Contributor

You mean add service orchestration officially?

@PhilsLab
Copy link
Author

@jeasonstudio yes, i want this application to integrate into k8s as good as possible, that would really help finding more use cases for it.

@jeasonstudio
Copy link
Contributor

#146

@RichardMcSorley
Copy link
Contributor

I would recommend to send this as a feature request to VSCode team too. Otherwise possibly an extension could do this 🤔 maybe

@sr229
Copy link
Contributor

sr229 commented Apr 4, 2019

@RichardMcSorley we can do a VSCode extension instead.

@kylecarbs
Copy link
Member

We have something in the works for this. Closing for now 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

5 participants