From 6a6d760fc09609e92f668ac453886a3bc9f160a2 Mon Sep 17 00:00:00 2001 From: Rahul Rai Date: Thu, 14 May 2020 15:20:58 +1000 Subject: [PATCH] Setting context inside the build element doesn't work I am using Docker Desktop for Windows v 2.2.0.5 on Windows 10. In my case, VSCode was not able to set the container build context correctly by reading the build.context property. I fixed the issue by setting the context property as mentioned in the schema here: https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference. --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 84edbdf..19bfd1b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,8 @@ { "name": "Python 3 Sample", + "context": "..", "build": { "dockerfile": "Dockerfile", - "context": "..", // Update 'VARIANT' to pick a Python version. Rebuild the container // if it already exists to update. Available variants: 3, 3.6, 3.7, 3.8 "args": { "VARIANT": "3.7" }