Compose.NET 0.1.0

dotnet add package Compose.NET --version 0.1.0
                    
NuGet\Install-Package Compose.NET -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Compose.NET" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Compose.NET" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Compose.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Compose.NET --version 0.1.0
                    
#r "nuget: Compose.NET, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Compose.NET@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Compose.NET&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Compose.NET&version=0.1.0
                    
Install as a Cake Tool

Compose.NET

NuGet NuGet Downloads License

English | 简体中文

Compose.NET is a .NET port of compose-go. It parses and loads Docker Compose files into strongly-typed C# models, without requiring Docker Engine.

Why This Project

  • You need Compose file parsing in .NET tools, services, or CI automation.
  • You want behavior aligned with compose-go, but with idiomatic C# APIs.
  • You want a pure library dependency (no Docker runtime dependency).

Features

  • Compose parsing pipeline aligned with compose-go (interpolation, merge, include, extends, validation, normalization).
  • Strongly-typed domain models (Project, ServiceConfig, NetworkConfig, VolumeConfig, etc.).
  • Compose override/merge behavior and canonical transform support.
  • .env parser with variable expansion support.
  • Cross-file include/extends resolution.
  • Compatibility-oriented validation and consistency checks.
  • No Docker Engine dependency.

Target Frameworks

  • netstandard2.1
  • net8.0
  • net9.0
  • net10.0

Installation

dotnet add package Compose.NET

Quick Start

using Compose.NET.Loader;

var result = ComposeLoader.LoadFromFile("compose.yaml");
var project = result.Project;

foreach (var (name, service) in project.Services)
{
    Console.WriteLine($"{name}: {service.Image}");
}

Load from YAML Content

using Compose.NET.Loader;

var yaml = """
services:
  web:
    image: nginx:latest
    ports:
      - "8080:80"
""";

var result = ComposeLoader.LoadFromContent(yaml);
Console.WriteLine(result.Project.Services["web"].Image);

Parse .env

using Compose.NET.DotEnv;

var env = EnvFileParser.ParseWithLookup("FOO=bar\\nBAZ=${FOO}_suffix");
Console.WriteLine(env["BAZ"]); // bar_suffix

Notes on Compatibility

  • The project is focused on functional behavior parity with compose-go.
  • Error message text and code style intentionally follow .NET conventions.

License

Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 126 3/9/2026