Null Ports property on ListContainersAsync
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start at Containers.ListContainersAsync and the container model's Ports property, using the supplied call with All=true to reproduce a response where Ports is null. Done means containers without ports expose an empty IList rather than null, with regression coverage for that response.
Written by the indexing model from the issue text.
Description
Hi, I found that some containers returned by ListContainersAsync may have a null Ports property instead of returning an empty IList.
Code Example
// DockerClient injected via DI
var dockerContainers = await _dockerClient.Containers.ListContainersAsync(
new ContainersListParameters { All = true }, cancellationToken);
foreach(var dockerContainer in dockerContainers)
{
// Ports property may be null
var ports = dockerContainer.Ports;
}
Inspected Example
In this example you can see the informations related to a container that actuallly has null Ports property.
System Info
Result of dotnet --info:
.NET SDK:
Version: 10.0.201
Commit: 4d3023de60
Workload version: 10.0.200-manifests.121cc9e6
MSBuild version: 18.3.0-release-26153-122+4d3023de6
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.201\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.5
Architecture: x64
Commit: a612c2a105
.NET SDKs installed:
10.0.201 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_GCHeapCount [2]
DOTNET_GCNoAffinitize [1]
DOTNET_MULTILEVEL_LOOKUP [0]
DOTNET_TC_CallCountThreshold [1000]
DOTNET_ThreadPool_UnfairSemaphoreSpinLimit [0]
DOTNET_gcConcurrent [0]
Detected COMPlus_* environment variable(s). Consider transitioning to DOTNET_* equivalent.
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Docker.DotNet Version:
3.125.15
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 416
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/Docker.DotNet
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/Docker.DotNet#702 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
dotnet/Docker.DotNet#700 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
dotnet/Docker.DotNet#698 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/Docker.DotNet#697 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dotnet/Docker.DotNet#696 ·
All issues in dotnet/Docker.DotNet
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·