gpt4 book ai didi

visual-studio-code - VS代码: Using dev container remotely without local installation of docker

转载 作者:行者123 更新时间:2023-12-04 15:43:36 26 4
gpt4 key购买 nike

目前,我有:

  • 低系统规范的桌面,Windows 7 Pro(没有管理员权限),没有 docker
  • 安装了 Centos7 和 docker 的虚拟机。

在我的桌面上,我可以使用:

  • 我在本地安装了 VSCode 和 Remote - SSH 以在我的 VM 上进行远程开发。它运行良好,但我无法将其与 Remote - Containers 结合使用。
  • X11Forwarding 直接使用此 VM 上安装的 VSCode 进行开发。我可以使用 Remote - Containers,但 X11 非常慢。

有没有办法使用本地 VSCode 在远程容器中进行开发,而无需在本地安装 docker(显然是在主机上安装了 docker)?

最佳答案

Is there a way, with local VSCode, to develop in a remote container, without local installation of docker (obviously with docker installed on the host)?

没有。在它说的“高级容器”文档中

You can use the Docker CLI locally with a remote Docker host by setting local environment variables like DOCKER_HOST, DOCKER_CERT_PATH, DOCKER_TLS_VERIFY. Since VS Code uses the Docker CLI under the hood, you can use these same environment variables to connect the Remote - Containers extension to the same remote host.

我添加了粗体。请注意,它指的是客户端而不是那里的远程。这是来自 Developing inside a container on a remote Docker host .

虽然官方不支持,但似乎可以在没有守护进程的情况下安装 Docker CLI...

Is it possible to install only the docker cli and not the daemon

也许你可以在没有管理员的情况下做到这一点?

不过,这肯定是逆势而行。也许您最好的选择是坚持使用您正在进行的“远程 - SSH”设置。

关于visual-studio-code - VS代码: Using dev container remotely without local installation of docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56836757/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com