Skip to content

Commit

Permalink
reverting dotnet changes..
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravsaini04 committed Aug 30, 2024
1 parent 242ff97 commit e5c3012
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
19 changes: 0 additions & 19 deletions src/dotnet/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@ ARG VARIANT=8.0-bookworm-slim
FROM mcr.microsoft.com/dotnet/sdk:${VARIANT}
ENV PATH $PATH:/home/vscode/.dotnet:/home/vscode/.dotnet/tools

ARG VARIANT
ENV VARIANT=${VARIANT}

RUN if [ "${VARIANT#*noble}" != "$VARIANT" ]; then \
echo "Variant contains noble"; \
# Check if ubuntu user exists and delete it if it does
if id "ubuntu" &>/dev/null; then \
echo "Deleting user ubuntu" && userdel -f -r ubuntu || echo "Failed to delete ubuntu user"; \
echo "Deleting group associated with ubuntu" && groupdel ubuntu || echo "Failed to delete group associated with ubuntu user"; \
#check if group 1000 and user 1000 is deleted
echo "Checking user at 1000 uid" && getent passwd 1000 || echo "Failed to find user at uid 1000;" \
echo "Checking group at 1000 gid" && getent group 1000 || echo "Failed to find group at gid 1000"; \
else \
echo "User ubuntu does not exist"; \
fi; \
else \
echo "Variant does not contain noble"; \
fi

# clear this environment variable so xml docs from NuGet packages are unpackaged. The default dotnet/sdk image sets it to 'skip'.
# see https://github.com/dotnet/dotnet-docker/issues/2790
ENV NUGET_XMLDOC_MODE=
2 changes: 0 additions & 2 deletions src/dotnet/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/node:1": {
Expand Down
13 changes: 0 additions & 13 deletions src/dotnet/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,5 @@ check "usr-local-etc-config-does-not-exist" test ! -f "/usr/local/etc/gitconfig"

checkPackageVersion "pwsh" "7.4.4" "PowerShell"

os_release=$(cat /etc/os-release)
# Check if the output contains "NAME=Ubuntu" and "VERSION=24.04"
if echo "$os_release" | grep -q "NAME=\"Ubuntu\"" && echo "$os_release" | grep -q "VERSION=\"24.04"; then
check "Find ubuntu User" bash -c "grep 'ubuntu' /etc/passwd || echo 'ubuntu user not found.'"
check "Find ubuntu Group" bash -c "grep 'ubuntu' /etc/group || echo 'ubuntu group not found.'"
check "Find vscode User" bash -c "grep 'vscode' /etc/passwd || echo 'vscode user not found.'"
check "Find vscode Group" bash -c "grep 'vscode' /etc/group || echo 'vscode group not found.'"

check "log file contents" bash -c "cat /tmp/logfile.txt"
check "all users" bash -c "cat /etc/passwd"
check "uid" bash -c "id -u vscode | grep 1000"
fi

# Report result
reportResults

0 comments on commit e5c3012

Please sign in to comment.