aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotnet/devcontainer-feature.json4
-rw-r--r--src/dotnet/install.sh8
-rw-r--r--test/dotnet/build_dotnet_7.sh2
-rw-r--r--test/dotnet/run_dotnet_7.sh2
-rw-r--r--test/dotnet/scenarios.json6
5 files changed, 14 insertions, 8 deletions
diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json
index b0746f4..ac7e7f1 100644
--- a/src/dotnet/devcontainer-feature.json
+++ b/src/dotnet/devcontainer-feature.json
@@ -14,12 +14,12 @@
"3"
],
"default": "latest",
- "description": "Version of .NET to install. Use 'latest' to install the latest LTS version."
+ "description": "Version of .NET to install. Use 'latest' for the latest LTS version, 'X' for the latest of a major version, or 'X.Y.Z' for a specific version."
},
"additionalVersions": {
"type": "string",
"default": "",
- "description": "Comma-separated list of additional .NET versions to install."
+ "description": "Comma-separated list of additional .NET versions to install. Use 'latest' for the latest LTS version, 'X' for the latest of a major version, or 'X.Y.Z' for a specific version."
},
"runtimeOnly": {
"type": "boolean",
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh
index 455d679..a302947 100644
--- a/src/dotnet/install.sh
+++ b/src/dotnet/install.sh
@@ -33,7 +33,7 @@ check_packages() {
}
# Installs a version of .NET using the DOTNET_INSTALLER_SCRIPT
-# The version must be 'latest', use the form 'N', or use the form 'N.M.O'
+# The version must be 'latest', use the form 'X', or use the form 'X.Y.Z'
install_version() {
local version="$1"
local channel="LTS"
@@ -41,15 +41,15 @@ install_version() {
echo "Installing version '$version'..."
- # If version is just a major value (form 'N'), assume it is a channel
+ # If version is just a major value (form 'X'), assume it is a channel
if [[ "$version" =~ ^[0-9]+$ ]]; then
channel="$version.0"
version="latest"
fi
- # Make sure the version is formatted correctly (form 'N' is handled before this)
+ # Make sure the version is formatted correctly (form 'X' is handled before this)
if ! [[ "$version" = "latest" || "$version" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
- echo "Invalid version '$version': version must be 'latest' or use the form 'N.M.O'"
+ echo "Invalid version '$version': version must be 'latest' or use the form 'X.Y.Z'"
return 1
fi
diff --git a/test/dotnet/build_dotnet_7.sh b/test/dotnet/build_dotnet_7.sh
index 62e950c..813282c 100644
--- a/test/dotnet/build_dotnet_7.sh
+++ b/test/dotnet/build_dotnet_7.sh
@@ -4,6 +4,8 @@ set -e
source dev-container-features-test-lib
+check "non-root user" test "$(id -u)" -ne 0
+
pushd example_project
check "dotnet restore" dotnet restore
check "dotnet build" dotnet build
diff --git a/test/dotnet/run_dotnet_7.sh b/test/dotnet/run_dotnet_7.sh
index ea66bd4..cde1d9d 100644
--- a/test/dotnet/run_dotnet_7.sh
+++ b/test/dotnet/run_dotnet_7.sh
@@ -4,6 +4,8 @@ set -e
source dev-container-features-test-lib
+check "non-root user" test "$(id -u)" -ne 0
+
pushd example_project
check "dotnet run" bash -c "dotnet run | grep 'Inception'"
diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json
index f4127f2..45a268f 100644
--- a/test/dotnet/scenarios.json
+++ b/test/dotnet/scenarios.json
@@ -58,7 +58,8 @@
}
},
"build_dotnet_7": {
- "image": "ubuntu:jammy",
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+ "remoteUser": "vscode",
"features": {
"dotnet": {
"version": "7"
@@ -66,7 +67,8 @@
}
},
"run_dotnet_7": {
- "image": "ubuntu:jammy",
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+ "remoteUser": "vscode",
"features": {
"dotnet": {
"version": "7"