4

如何使用新的远程开发扩展从 Docker 容器设置远程显示转发?

目前,我的.devcontainer包含:

devcontainer.json

{
    "name": "kinetic_v5",
    "context": "..",
    "dockerFile": "Dockerfile",
    "workspaceFolder": "/workspace",
    "runArgs": [
        "--net", "host",
        "-e", "DISPLAY=${env:DISPLAY}",
        "-e", "QT_GRAPHICSSYSTEM=native",
        "-e", "CONTAINER_NAME=kinetic_v5",
        "-v", "/tmp/.X11-unix:/tmp/.X11-unix",
        "--device=/dev/dri:/dev/dri",
        "--name=kinetic_v5",
    ],
    "extensions": [
        "ms-python.python"
    ]
}

Dockerfile

FROM docker.is.localnet:5000/amd/official:16.04

RUN apt-get update && \
    apt-get install -y zsh \
    fonts-powerline \
    locales \
    # set up locale
    && locale-gen en_US.UTF-8

RUN pip install Cython

# run the installation script  
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true

CMD ["zsh"]

这似乎不起作用。

设置细节:

  • 操作系统:Linux
  • 产品:Visual Studio Code - Insiders
  • 产品版本:1.35.0-inside
  • 语言:en

更新:您可以在官方 git repo 上找到关于此问题的线程

4

0 回答 0