
最近在配置.net的remote開發環境,用了整套VS Code Remote的三大件,在用container時總是提示:
Remote - Containers Docker version 17.12.0 or later required.
一頭霧水,docker版本20了都,可能的理解就是它沒找到docker。可是信息有限,好在開源項目有issue,作者介紹了debug的辦法,適用於進一步調試。
When you see this, could you click Cancel and then check the dev container log (F1 > Remote-Containers: Show Container Log) and the dev console (Help > Toggle Developer Tools) and post these here?
Developer Tools就是chrome的開發欄,是同一個東西,能夠看到UI的日志,已經發現就是Docker version這個命令的返回值出錯,作者在issue中反復提到會不會是沒加入Path,我不信。最后他終於提到了,如果再vs code 運行中更新過docker就會出現這個bug,解決的辦法就是在更新docker后重啟一下vs code即可。
另外還有的碰到這個問題可以嘗試通過更新vs code和docker desktop到最新的版本。
如果還是不可以除了打開日志查看報錯外,可以嘗試查看docker context,看看當前的context是不是default。
