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

Open tunnel directly to a devcontainer #9131

Open
jjcasmar opened this issue Oct 25, 2023 · 5 comments
Open

Open tunnel directly to a devcontainer #9131

jjcasmar opened this issue Oct 25, 2023 · 5 comments
Assignees
Labels
containers Issue in vscode-remote containers tunnels under-discussion Issue is under discussion for relevance, priority, approach

Comments

@jjcasmar
Copy link

Right now, when I enable tunnels in vscode, its a tunnel to the host system.

It would be nice to be able to open a tunnel to a devcontainer directly, so that we can connect to that devcontainer from vscode.dev.

Technically this is possible, because its already possible to install Code CLI inside the container and open the tunnel manually using the CLI, however, its not possible to do it from the VSCode itself.

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Oct 25, 2023
@connor4312
Copy link
Member

I think the way to do this is just to be able to connect to devcontainers over a tunnel on the host system. This is already possible if you connect to the tunnel from VS Code desktop, but the Remote - Containers extension is not web enabled yet, so it doesn't run in the browser on vscode.dev.

@connor4312 connor4312 assigned chrmarti and unassigned connor4312 Oct 27, 2023
@jjcasmar
Copy link
Author

@connor4312 This is not exactly what I am proposing. You suggest connecting to host system using a tunnel and from the host system, connect to a devcontainer running on the host. This setup works fine if using the desktop app.

What I am proposing is, instead of opening a tunnel to the host and then connect to the devcontainer, is open a tunnel directly to the devcontainer. That way, from vscode.dev, you would be able to connect to the devcontainer directly through the tunnel.

As I said, this is already technically possible, as you can install the Code CLI on a docker container and start a tunnel directly from the tunnel.

@connor4312
Copy link
Member

As you said, if you want to run a tunnel in a container, you can install the code CLI and run that.

It sounds like you want some kind of host system integration, but I'm not clear on what you want there that's different from supporting the existing Remote - Containers over tunnels but on vscode.dev. Are you looking for support in the Remote Explorer so that you can open a workspace directly in a container instead of having to connect to the host as an intermediary?

@jjcasmar
Copy link
Author

I want some integration, as the one the host system has. From VSCode Desktop I can hit F1, search for Open Tunnel and directly open a tunnel. But it doesn't matter if I am inside the devcontainer or not, it always open the tunnel to the host system.

I think it would be a QoL improvement if I can open the tunnel to the host system OR to the devcontainer directly, without the need of doing it by using the CLI, which actually requires to manually download the Code CLI app inside the container.

Given that Remote - Devcontainers are not supported on vscode.dev, being able to directly open a tunnel to the container would be a great benefit, as we would be able to use vscode.dev and connect to the devcontainer through the tunnel (which is supported), instead of through the tunnel to the host + remote devcontainer (which is not supported).

However, given that I can automate the creation of the tunnel using an access token (#9132 (comment)), I guess I can just have my development images have that by default.

@chrmarti
Copy link
Contributor

Related: #9059 (Dev Containers for vscode.dev)

@chrmarti chrmarti added the under-discussion Issue is under discussion for relevance, priority, approach label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers tunnels under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

4 participants