开发容器未在VSCode中启动

时间:2019-10-07 08:17:06

标签: docker visual-studio-code windows-10

嗨,我正在尝试从https://github.com/microsoft/vscode-remote-try-cpp打开开发容器,在创建它时会得到一个error message

这也表示此命令失败:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe run -a STDOUT -a STDERR --mount type=bind,source=c:/Users/jnvie/vscode-remote-try-cpp,target=/workspaces/vscode-remote-try-cpp,consistency=cached -l vsch.quality=stable -l vsch.local.folder=c:\Users\jnvie\vscode-remote-try-cpp -l vsch.remote.devPort=0 -u vscode --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --entrypoint /bin/sh vsc-vscode-remote-try-cpp-a8dfd3c1511c138f783ff7d36d26f76c -c echo Container started ;  while sleep 1; do :; done

出现此错误消息:

SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Run: docker run -a STDOUT -a STDERR --mount type=bind,source=c:/Users/jnvie/vscode-remote-try-cpp,target=/workspaces/vscode-remote-try-cpp,consistency=cached -l vsch.quality=stable -l vsch.local.folder=c:\Users\jnvie\vscode-remote-try-cpp -l vsch.remote.devPort=0 -u vscode --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --entrypoint /bin/sh vsc-vscode-remote-try-cpp-a8dfd3c1511c138f783ff7d36d26f76c -c echo Container started ;  while sleep 1; do :; done
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Drive sharing failed for an unknown reason.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

我的系统正在运行Windows 10 Pro,在升级并获得适用于Windows的Docker桌面之前,我以前曾运行过docker工具箱

1 个答案:

答案 0 :(得分:0)

在遇到当前问题之前,我经历了该问题。我必须授权该目录才能访问,但是您可能会遇到一些警告。 本文为我涵盖了许多内容:https://blogs.msdn.microsoft.com/stevelasker/2016/06/14/configuring-docker-for-windows-volumes/