microsoft / microsoft/vscode-remote-release

Attach to running docker container by name in CLI and document code remote CLI options

Open
#5,278 24 comments 14 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 13, 2021.

containers feature-request
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Hi and thank you all very much for your hard work on vscode and vscode-remote! It's simply brilliant.

Context

We're using tools like https://github.com/drud/ddev or https://lando.dev/ to build and run smart development docker containers.
We're using VSCode Remote to attach to these running containers using the wonderful UI via F1 + Remote-Containers: Attach to Running Container ...
There we select the container we'd like to attach to and run it.

Problem

This works, but for developers like you and us the process isn't really perfect. It's clicky here, clicky there for a task where you'd expect to write a shell script and GO :)

I've read many similar issues, most are about how to start devcontainers / k8 or ssh remote connections.
Anyway it seems such CLI parameters aren't yet officially documented?

For our use-case (attaching to a running docker container by name from CLI / shell script) I couldn't find a viable solution. That's why I've written this feature request to document the CLI options and provide a clever way to start vscode from CLI / shell script attached to a running container by container name / id.

Proposed solution
  1. Document the CLI parameters officially with examples how to start vscode from CLI in remote (devcontainer, attached to running container, k8, ssh, ...?)
  2. Allow to attach to a running container from CLI by container name (or document how to do that if that should be possible already)

Once again, thank you very much for your hard work on this wonderful project!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.