Small change to dev container setup. (#3686)
authorJarret Shook <jshook@roblox.com>
Sat, 25 Feb 2023 18:13:26 +0000 (10:13 -0800)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2023 18:13:26 +0000 (10:13 -0800)
Updates it to work with the newer vs code releases, and in addition, adds --priviledged to allow debugging SOS under the devcontainer.

Note: for arm64 macs, running x64 container images can be run with:

devcontainer.json:
"runArgs": ["--platform=linux/amd64" ]

and `FROM --platform=linux/amd64 `
in the dockerfile

.devcontainer/devcontainer.json
eng/build.sh

index cba68c3e9227351ddf9835b4d12a180108fe4108..41e39612dda06ffac2f4337987d6ffad0a7ad4a1 100644 (file)
@@ -4,9 +4,11 @@
        "name": "C# (.NET)",
        "build": {
                "dockerfile": "Dockerfile",
-               "args": {
-                       // Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0, 6.0
-                       "VARIANT": "6.0-focal",
+               "args": { 
+                       // Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
+                       "VARIANT": "6.0",
+                       // Options
+                       "NODE_VERSION": "lts/*"
                }
        },
 
@@ -24,6 +26,9 @@
                "ms-vscode.cpptools-extension-pack"
        ],
 
+       // Needed to debug sos extension under container.
+       "privileged": true,
+
        // Add the locally installed dotnet to the path to ensure that it is activated
        // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used.
        // Add the global tools dir to the PATH so that globally installed tools will work
@@ -34,4 +39,4 @@
 
        // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
        "remoteUser": "vscode"
-}
+}
\ No newline at end of file
index 65a5c8e8353f2224150d6b014ab4c01068985c9f..af96a0a49fd003cbdc93fa114c7047db99c307c4 100755 (executable)
@@ -115,7 +115,7 @@ handle_arguments() {
 }
 
 source "$__RepoRootDir"/eng/native/build-commons.sh
-source "$repoRootDir/eng/native/init-os-and-arch.sh"
+source "$__RepoRootDir/eng/native/init-os-and-arch.sh"
 
 __BuildArch="$arch"