CodeBrix.Docker.MitLicenseForever
1.0.244.840
See the version list below for details.
dotnet add package CodeBrix.Docker.MitLicenseForever --version 1.0.244.840
NuGet\Install-Package CodeBrix.Docker.MitLicenseForever -Version 1.0.244.840
<PackageReference Include="CodeBrix.Docker.MitLicenseForever" Version="1.0.244.840" />
<PackageVersion Include="CodeBrix.Docker.MitLicenseForever" Version="1.0.244.840" />
<PackageReference Include="CodeBrix.Docker.MitLicenseForever" />
paket add CodeBrix.Docker.MitLicenseForever --version 1.0.244.840
#r "nuget: CodeBrix.Docker.MitLicenseForever, 1.0.244.840"
#:package CodeBrix.Docker.MitLicenseForever@1.0.244.840
#addin nuget:?package=CodeBrix.Docker.MitLicenseForever&version=1.0.244.840
#tool nuget:?package=CodeBrix.Docker.MitLicenseForever&version=1.0.244.840
CodeBrix.Docker
A cross-platform, zero-dependency .NET library for managing, diagnosing, and optimizing Docker containers and images. Works anywhere Docker runs: Linux (Debian and others), Windows, and macOS (Docker Desktop), talking to the Docker Engine API over the platform's native transport — named pipe on Windows, Unix socket elsewhere.
Published on NuGet as CodeBrix.Docker.MitLicenseForever — MIT licensed, forever.
Features
Lifecycle — create/run/stop/remove containers with typed ResourceLimits (CPUs, cpuset,
shares, memory, reservation, swap, PID limits), live resource retuning via docker update
semantics, exec, logs, stats, image pull/build (BuildKit via CLI)/tag/history/prune, networks
(incl. aliases), volumes, system info, and event streaming.
Diagnostics — the signals that matter for right-sizing containers:
- CPU throttling reports (
nr_throttled / nr_periodsratio with severity and interpretation) - OOM-kill detection (OOMKilled flag, exit code 137, restart counts)
- Memory breakdown — application memory (
anon) vs. reclaimable page cache (file), so a "high memory" container isn't misdiagnosed - Health-check monitoring and
WaitForHealthyAsync
Optimization advisor — a rules engine encoding container best practices: missing memory/PID
limits, swap not disabled, throttling too high, running as root, missing health checks,
unbounded log growth, :latest tags, privileged mode, and more.
Image analysis — runs Trivy (CVE scanning), Dive (layer efficiency), and Hadolint (Dockerfile linting) as containers — no local tool installation required. Experimental Slim integration for automatic image minification.
Quick start
using CodeBrix.Docker;
using var docker = DockerClient.Create();
// Run a container with resource limits
var id = await docker.Containers.RunAsync(new ContainerSpec
{
Image = "nginx:alpine",
Name = "web",
Limits = new ResourceLimits
{
Cpus = 0.5,
MemoryBytes = ResourceLimits.Megabytes(256),
MemorySwapBytes = ResourceLimits.Megabytes(256), // disable swap
PidsLimit = 200,
},
});
// Diagnose it
var report = await docker.Diagnostics.DiagnoseAsync(id);
Console.WriteLine(report.CpuThrottling.Interpretation);
// Get optimization advice
foreach (var finding in await docker.Advisor.AnalyzeContainerAsync(id))
Console.WriteLine($"[{finding.Severity}] {finding.Title}: {finding.Recommendation}");
// Scan the image for vulnerabilities
var scan = await docker.Analysis.ScanImageAsync("nginx:alpine");
Console.WriteLine($"{scan.Total} vulnerabilities ({scan.CountBySeverity})");
Requirements
- .NET 10.0+
- A reachable Docker daemon (Linux containers mode). Default endpoints:
npipe://./pipe/docker_engine(Windows),unix:///var/run/docker.sock(Linux/macOS);DOCKER_HOSTis honored. - The
dockerCLI on PATH for image builds (BuildKit) and authenticated pulls.
License
MIT — see LICENSE. Contains code adapted from Docker.DotNet (MIT, .NET Foundation and Contributors) — see THIRD-PARTY-NOTICES.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CodeBrix.Docker.MitLicenseForever:
| Package | Downloads |
|---|---|
|
CodeBrix.RustTools.Docker.MitLicenseForever
A .NET library for building Rust applications inside a Linux Docker container, so the machine needs a running Docker engine but no Rust tools. Checks that the engine is reachable and returns operating-system-specific guidance when it is not; prepares the build image from the official rust image with optional generated layers for extra system packages, clippy and rustfmt, a pinned Rust version, and Windows and Android cross-compilation; starts labelled build containers with persistent cargo cache volumes; copies the project source in, applies a license policy and runs cargo inside the container with typed diagnostics, progress and test results; copies executables and native libraries out (optionally in the NuGet runtimes layout); does it all in one call for several targets; and cleans up everything it created. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.292.271 | 128 | 10/19/2026 |
| 1.0.284.250 | 114 | 10/11/2026 |
| 1.0.283.404 | 113 | 10/10/2026 |
| 1.0.282.435 | 107 | 10/9/2026 |
| 1.0.259.361 | 125 | 9/16/2026 |
| 1.0.254.1406 | 130 | 9/11/2026 |
| 1.0.244.840 | 126 | 9/1/2026 |