-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Comments
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. |
|
You mean add service orchestration officially? |
@jeasonstudio yes, i want this application to integrate into k8s as good as possible, that would really help finding more use cases for it. |
I would recommend to send this as a feature request to VSCode team too. Otherwise possibly an extension could do this 🤔 maybe |
@RichardMcSorley we can do a VSCode extension instead. |
We have something in the works for this. Closing for now 👀 |
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
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.
The text was updated successfully, but these errors were encountered: