Windows Version
Microsoft Windows [Version 10.0.26200.8655]
WSL Version
2.9.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
Whatever runs WSLC
Distro Version
Whatever runs WSLC
Other Software
NuGet: Microsoft.WSL.Containers 2.9.3
Repro Steps
var containerSettings = new ContainerSettings(ImageName)
{
Name = ContainerName,
EnableAutoRemove = true,
PortMappings = new List<ContainerPortMapping>()
{
new (windowsPort: 8080,
containerPort: 8080,
protocol: PortProtocol.TCP),
},
};
container = session.CreateContainer(containerSettings);
The following does not throw any exception, though does not map ports either.
var containerSettings = new ContainerSettings(ImageName)
{
Name = ContainerName,
EnableAutoRemove = true,
};
container = session.CreateContainer(containerSettings);
Expected Behavior
Something like
wslc --session MySession run --rm -p 8080:8080 --name MyContainer MyImage
Actual Behavior
System.ArgumentException: 'The parameter is incorrect.
The parameter is incorrect.
'
Diagnostic Logs
No response
Windows Version
Microsoft Windows [Version 10.0.26200.8655]
WSL Version
2.9.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
Whatever runs WSLC
Distro Version
Whatever runs WSLC
Other Software
NuGet: Microsoft.WSL.Containers 2.9.3
Repro Steps
The following does not throw any exception, though does not map ports either.
Expected Behavior
Something like
Actual Behavior
Diagnostic Logs
No response