{ "name": "DeepStream Dev Container", //Defines the display name of the dev container in the VS Code UI //"context": "..", // Specifies the build context for the container β€” i.e., the directory from which the Docker build command is run. // Use "." if your .devcontainer directory is at the root of the Docker context. // Use ".." if your .devcontainer/ folder is inside the project and the Dockerfile is in the parent folder. // If you are using a Docker image instead of building a Dockerfile, this field can be omitted. // "dockerFile": "../Dockerfile", // path relative to .devcontainer // The "dockerFile" key tells VS Code which Dockerfile to use when building your development container. // Without this, VS Code won’t know how to construct the container environment β€” unless you're using // a prebuilt "image" instead. // You set it as a path relative to the .devcontainer/ folder. // Your .devcontainer/devcontainer.json is in: /path/to/project/.devcontainer/devcontainer.json // Your Dockerfile is in: /path/to/project/Dockerfile // If you use dockerFile, you must specify context, since Docker needs to know the build context. // πŸ” Alternative: Use a prebuilt image // If you don't have a Dockerfile and want to base your dev container on an existing // image (e.g., NVIDIA's DeepStream container), use: // "image": "nvcr.io/nvidia/deepstream:6.4-triton-devel" // And omit the dockerFile/context fields entirely. "workspaceFolder": "/root/temp_code/rtsp_in_rtsp_out", // your actual project path inside container // Sets the default working directory inside the container β€” this is where VS Code opens your workspace. // This should match the path inside the container where your source code is mounted. // It must exist after mounting. // Make sure this path matches the mount point + subfolder. "mounts": [ "source=/root/temp_code,target=/rtsp_in_rtsp_out,type=bind" ], // Mounts files/directories from your host system into the container. Useful when your codebase or data is // outside of the default workspace path. // source: path on the host // target: path inside the container // type=bind: bind mount (like a symbolic link across environments) // Make sure this path works correctly and isn't conflicting with workspaceMount. "customizations": { "vscode": { "settings": { "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "C_Cpp.default.compileCommands": "build/compile_commands.json" }, "extensions": [ "ms-vscode.cpptools", "ms-vscode.cmake-tools", "mhutchie.git-graph" ] } }, // Allows you to define VS Code-specific settings, extensions, or UI changes for the container. //"settings": { // "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", // "C_Cpp.default.compileCommands": "build/compile_commands.json" //}, "postCreateCommand": "echo Dev container ready" // "postCreateCommand": "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build -S ." // Runs a shell command after the container is created and ready (but before opening VS Code in it). // Use it to run cmake, install dependencies, or print a message. }