Skip to content

Support attach to running container #17342

@ndoschek

Description

@ndoschek

Feature Description:

Add support for attaching Theia to an already running Docker container, injecting the Theia backend, and opening a remote workspace inside it.

This includes:

  • List running containers and let the user pick one
  • Inject the Theia backend into the container and establish a remote connection
  • Determine a sensible workspace path (from container mounts, working directory, or user selection)
  • Respect DOCKER_HOST for non-default Docker sockets
  • Do not stop the container on disconnect
  • Optionally read and apply devcontainer.json if present in the workspace (remoteUser, remoteEnv, postAttachCommand, port forwarding, extensions/settings)
  • Run postConnect hooks (SSH/git config sharing, port setup)
  • Show a warning before attaching: the container may execute arbitrary code, only attach to containers whose origin you trust

Metadata

Metadata

Assignees

Labels

dev-containerremoteissues related to the remote functionality

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions