question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Terminals via Docker containers

See original GitHub issue

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: <kbd>.code-server/settings.json</kbd>

{
    "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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sr229commented, 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.

0reactions
kylecarbscommented, Apr 24, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integrated Terminal for Running Containers, Extended ...
With Docker Desktop 4.12, you can quickly start an interactive session in a running container directly through a Docker Dashboard terminal. This ...
Read more >
How to open multiple terminals in docker? - Stack Overflow
You can run docker exec -it <container> bash from multiple terminals to launch several sessions connected to the same container.
Read more >
Terminals via Docker containers · Issue #190 - GitHub
From my point of view, having the terminals access the host machine is a big downside when it comes to security and tooling....
Read more >
Connectors via Docker - OpenIAM Documentation
This section describes how to deploy and start your connectors in docker deployment.
Read more >
7 cool uses for Docker: WINE and tweeting from terminals
They made it possible to run multiple isolated Linux environments on a single Linux host. Docker took that took the next level starting...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found