Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code VS代码开发容器:未能下载VS代码服务器_Visual Studio Code - Fatal编程技术网

Visual studio code VS代码开发容器:未能下载VS代码服务器

Visual studio code VS代码开发容器:未能下载VS代码服务器,visual-studio-code,Visual Studio Code,每次我更新VS代码时,我的开发容器都会因下载VS代码服务器失败而中断: [16413 ms] Installing VS Code Server for commit d2e414d9e4239a252d1ab117bd7067f125afd80a [16413 ms] Start: Run in container: mkdir -p /home/<my_username>/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125a

每次我更新VS代码时,我的开发容器都会因下载VS代码服务器失败而中断:

[16413 ms] Installing VS Code Server for commit d2e414d9e4239a252d1ab117bd7067f125afd80a
[16413 ms] Start: Run in container: mkdir -p /home/<my_username>/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a_1602875933619
[16432 ms] 
[16432 ms] 
[16470 ms] Start: Downloading VS Code Server
[16686 ms] Failed to download VS Code Server (https://update.code.visualstudio.com/commit:d2e414d9e4239a252d1ab117bd7067f125afd80a/server-linux-x64/stable): HTTP 403 - Forbidden

如果说我和我的团队对此感到厌倦,那就太轻描淡写了。真正的解决方案是什么?

看起来这在1.55.0中得到了解决


w00t w00t

嗨。我刚开始使用docker,并将其与WSL一起使用。我面临着同样的问题,我想知道你是否找到了解决办法。你还说“我的devcontainer.json指的是一个图像,而不是dockerfile”,你能告诉我你是怎么做到的吗?不幸的是,我仍然在做这个过程,尽管我已经编写了使用图像的脚本:在VSCode之外构建图像,但你通常都这么做;在devcontainer.json中,使用字段“image”:“your_image_name”(而不是dockerfile或dockercompose)
commit=d2e414d9e4239a252d1ab117bd7067f125afd80a   # <= replace this

cd ~/.vscode-server/bin
mkdir ${commit}
curl https://update.code.visualstudio.com/commit:${commit}/server-linux-x64/stable -L --output ${commit}.gz
tar --no-same-owner -xz --strip-components 1 -C ./${commit} -f ./${commit}.gz