Comments (4)
Thanks for opening! If you install the VS Code Dev Containers extension and right click, I believe this attach option is added when exploring containers from the Docker extension. Does installing the Dev Containers extension help?
from templates.
Yes, sorry if I wasn't clear enough. I am trying to add a "Attach Visual Studio Code" to my own VSCode extension which I'm building so I need to implement the code behind the feature I referenced. The use-case is similar - I want my users to be able to Attach VSCode to a Kubernetes pod I show them in my UI. I'm struggling to find docs to help me with this - I'd be grateful if you could share/link me to the steps.
from templates.
I've been doing some digging and found a seemingly related question that proposes the following terminal command to open a Remote Visual Studio window attached to a docker container:
code --folder-uri "vscode-remote://attached-container+<SOMETHING>"
I suspect that the "Attach Visual Studio Code" menu option I screenshotted above is launching a terminal command like this. I've tried lots of variants of hex values etc. to try and launch a VSCode window connected to my kubectl pod but haven't yet had any success.
I'd be really grateful if you could share the terminal command (or process) that mirrors the steps described in Attach to a container in a Kubernetes cluster.
Thanks!
from templates.
Aha, I found the answer. This fantastic contributor solved it.
cmd = f"code --folder-uri "vscode-remote://k8s-container%2Bcontext%3D{context}+podname={podname}+namespace={namespace}+name={container_name}{some_path}"
Be careful to escape any slashes with %2F in the URI.
from templates.
Related Issues (20)
- Question on Debian / Ubuntu & Centos/RHEL/Azure Linux family of support HOT 1
- Nice HOT 1
- Request: a devcontainer suitable for developing Electron applications HOT 2
- The Anaconda image specified in the documentation is not available.
- [JS -node-mongo] Add Template options for bookworm
- How to initiate xdebug via web browser? HOT 2
- "Using localhost in Docker Compose" doc can have some improvement HOT 1
- ruby-rails-postgres devcontainer has no internet access
- Hi 👋 HOT 1
- dotnet template should include a volume mount for nuget package caching HOT 1
- include C# Dev Kit in dotnet template HOT 3
- Pin PostgreSQL version in `*-postgres` templates HOT 2
- javascript-node-mongo not building the container HOT 2
- Could not connect to mariaDB with imageVariant default HOT 1
- Docs about templates usage and behavior HOT 4
- Is there a way to `publish` template as image?
- typescript-node npm scripts error access HOT 1
- Stuck in "Replacing imageVariant with ..." step HOT 7
- I am a greener. Just ask a simple question about the toolchain in the container. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.