[英]How do I make visual studio code running on my laptop connect to remote machine via ssh and build/debug on docker container on remote machine
I have a mac laptop where I am running Visual Studio code.我有一台运行 Visual Studio 代码的 Mac 笔记本电脑。 My source code lives on a bigger Linux machine which has docker installed, with a docker image that has my build environment.
我的源代码位于安装了 docker 的更大的 Linux 机器上,docker 映像包含我的构建环境。 I would like to connect to the remote desktop via ssh, and then to the docker container to build, run and debug in VSCode.
我想通过 ssh 连接到远程桌面,然后连接到 docker 容器以在 VSCode 中构建、运行和调试。 Is this possible?
这可能吗? I have SSH, remote containers extensions installed.
我安装了 SSH,远程容器扩展。 I can see the docker images but I cannot attach to the images after I run them.
我可以看到 docker 图像,但在运行后无法附加到图像。
I think it's not possible with visual studio code, but with visual studio for Mac 2019, you can install Docker desktop for Mac and add support for Docker to your project.我认为使用 Visual Studio 代码是不可能的,但是使用 Visual Studio for Mac 2019,您可以为 Mac 安装 Docker 桌面并将对 Docker 的支持添加到您的项目中。 After that, you can run and debug your app in local container.
之后,您可以在本地容器中运行和调试您的应用程序。
https://docs.microsoft.com/en-us/visualstudio/mac/docker-quickstart https://docs.microsoft.com/en-us/visualstudio/mac/docker-quickstart
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.