diff --git a/src/base-ubuntu/.devcontainer/Dockerfile b/src/base-ubuntu/.devcontainer/Dockerfile index 907cc9349..dec1796ff 100644 --- a/src/base-ubuntu/.devcontainer/Dockerfile +++ b/src/base-ubuntu/.devcontainer/Dockerfile @@ -14,14 +14,6 @@ RUN if [ "$VARIANT" = "noble" ]; then \ else \ echo "User ubuntu does not exist"; \ fi; \ - # Check for any processes using UID 1000 and kill them - PIDS=$(ps -u 1000 -o pid=) && \ - if [ -n "$PIDS" ]; then \ - echo "Killing processes with UID 1000"; \ - for pid in $PIDS; do \ - kill -9 $pid || echo "Failed to kill process $pid"; \ - done; \ - fi; \ # Double-check if UID 1000 is still in use if id -u 1000 &>/dev/null; then \ echo "UID 1000 is still in use. Exiting."; \ @@ -34,6 +26,8 @@ RUN if [ "$VARIANT" = "noble" ]; then \ echo "Modifying user vscode UID" && usermod -u 1000 vscode || echo "Failed to modify vscode UID"; \ echo "Modifying group vscode GID" && groupmod -g 1000 vscode || echo "Failed to modify vscode GID"; \ fi; \ + else \ + echo "Variant does not contain noble"; \ fi > /tmp/logfile.txt 2>&1 # [Optional] Uncomment this section to install additional OS packages. diff --git a/src/dotnet/.devcontainer/Dockerfile b/src/dotnet/.devcontainer/Dockerfile index 459e841e2..49a6125fe 100644 --- a/src/dotnet/.devcontainer/Dockerfile +++ b/src/dotnet/.devcontainer/Dockerfile @@ -13,11 +13,6 @@ RUN if [ "${VARIANT#*noble}" != "$VARIANT" ]; then \ else \ echo "User ubuntu does not exist"; \ fi; \ - # Check for any processes using UID 1000 and kill them - if ps -u 1000 &>/dev/null; then \ - echo "Killing processes with UID 1000"; \ - pkill -u 1000 || echo "Failed to kill processes with UID 1000"; \ - fi; \ # Ensure UID 1000 is not in use by another user if id -u 1000 &>/dev/null; then \ echo "UID 1000 is already taken by another user. Exiting."; \ @@ -30,6 +25,8 @@ RUN if [ "${VARIANT#*noble}" != "$VARIANT" ]; then \ echo "Modifying user vscode UID" && usermod -u 1000 vscode || echo "Failed to modify vscode UID"; \ echo "Modifying group vscode GID" && groupmod -g 1000 vscode || echo "Failed to modify vscode GID"; \ fi; \ + else \ + echo "Variant does not contain noble"; \ fi > /tmp/logfile.txt 2>&1 # clear this environment variable so xml docs from NuGet packages are unpackaged. The default dotnet/sdk image sets it to 'skip'.