'dotnet workload install' command doesn't work on LXC container when login as ubuntu user
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dotnet6 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This was reported upstream (https:/
We narrowed it to the LXC containers when login as user scenario, which applies to whatever situation where we have SUDO_UID set (https:/
The issue is that no workloads are listed after a successful installation:
#Installation
ubuntu@dotnetJ:~$ dotnet workload install wasm-tools
Welcome to .NET 6.0!
-------
SDK Version: 6.0.116
----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https:/
----------------
Write your first app: https:/
Find out what's new: https:/
Explore documentation: https:/
Report issues and find source on GitHub: https:/
Use 'dotnet --help' to see available commands or visit: https:/
-------
Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https:/
Updated advertising manifest microsoft.
Updated advertising manifest microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Installing pack Microsoft.
Writing workload pack installation record for Microsoft.
Garbage collecting for SDK feature band(s) 6.0.100...
Successfully installed workload(s) wasm-tools.
#Checking
ubuntu@dotnetJ:~$ sudo dotnet workload list
Welcome to .NET 6.0!
-------
SDK Version: 6.0.116
----------------
[...]
-------
Installed Workload Ids
-------
Use `dotnet workload search` to find additional workloads to install.
The steps to reproduce are the following:
# Install lxd (https:/
In Ubuntu: sudo snap install lxd
In Fedora: dnf copr enable ganto/lxc4
dnf install lxd
Windows: choco install lxc (previously installing Chocolatey)
# Configuring LXD (https:/
lxd init #(interactive)
or
lxd init --minimal #(for a quick test)
# Creating the container
lxc launch --vm ubuntu-daily:jammy Jdotnet #(you can choose another name instead of Jdotnet)
# Login
lxc exec Jdotnet -- sudo --login --user ubuntu
# checking HOME (it should be /home/ubuntu)
env | grep HOME
# Installing dotnet6
sudo apt update
sudo apt install -y dotnet6
# The specific issue in #31685
dotnet workload install wasm-tools
dotnet workload list
description: | updated |