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.
This commit is contained in:
Rahul Rai
2020-05-14 15:20:58 +10:00
committed by GitHub
parent 29a93447a8
commit 6a6d760fc0

View File

@@ -1,8 +1,8 @@
{ {
"name": "Python 3 Sample", "name": "Python 3 Sample",
"context": "..",
"build": { "build": {
"dockerfile": "Dockerfile", "dockerfile": "Dockerfile",
"context": "..",
// Update 'VARIANT' to pick a Python version. Rebuild the container // 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 // if it already exists to update. Available variants: 3, 3.6, 3.7, 3.8
"args": { "VARIANT": "3.7" } "args": { "VARIANT": "3.7" }