Webwonders.Umbraco.DockerConfiguration 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Webwonders.Umbraco.DockerConfiguration --version 2.0.0                
NuGet\Install-Package Webwonders.Umbraco.DockerConfiguration -Version 2.0.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="Webwonders.Umbraco.DockerConfiguration" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Webwonders.Umbraco.DockerConfiguration --version 2.0.0                
#r "nuget: Webwonders.Umbraco.DockerConfiguration, 2.0.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.
// Install Webwonders.Umbraco.DockerConfiguration as a Cake Addin
#addin nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=2.0.0

// Install Webwonders.Umbraco.DockerConfiguration as a Cake Tool
#tool nuget:?package=Webwonders.Umbraco.DockerConfiguration&version=2.0.0                

Webwonders.Umbraco.DockerConfiguration

Webwonders.Umbraco.DockerConfiguration is a lightweight NuGet package that automatically configures a Docker-based SQL Server for Umbraco 13+. This package requires no changes to your Program.cs. This package is only intended for local development scenarios, where you need a cross-platform way to spin up a SQL Server instance inside Docker.

Features

  • Zero Touch: No modifications needed in Program.cs or any Umbraco composer.
  • Docker Validation: Checks if Docker is installed and running.
  • Docker Compose Generation: Creates a docker-compose.yml for SQL Server on demand.
  • Automatic Connection String: Dynamically configures Umbraco’s database connection for local development.

Installation

Install the package via NuGet:

Install-Package Webwonders.Umbraco.DockerConfiguration

Or the .NET CLI:

dotnet add package Webwonders.Umbraco.DockerConfiguration

That’s it! This package automatically configures everything for local Docker usage.

Configuration

To enable a local Docker-based SQL Server, set the following environment variables in your development environment. Typically, you can place these in launchSettings.json (used only in local dev). Example:

{
  "profiles": {
    "UmbracoProject": {
      "commandName": "Project",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development",
        "Use_Local_Docker_SQL": "true",
        "Local_Docker_DB_NAME": "YourDatabaseName",
        "Local_Docker_PASSWORD": "YourStrongPassword123",
        "Local_Docker_PORT": "1433"
      }
    }
  }
}

Environment Variables

  • Use_Local_Docker_SQL
    Set to "true" to enable local Docker-based SQL; "false" (or unset) to disable.
  • Local_Docker_DB_NAME
    Name of the SQL Server database to create in Docker.
  • Local_Docker_PASSWORD
    Password for the sa user.
  • Local_Docker_PORT
    Host port mapping for the SQL Server container.

Note: This package is intended for local development scenarios.

How It Works

  1. IHostingStartup Discovery
    ASP.NET Core automatically discovers this package’s startup logic, so no code changes are required in Program.cs.
  2. Docker Validation
    Checks if Docker is installed and running locally.
  3. Docker Compose
    If enabled (Use_Local_Docker_SQL=true), creates and runs a SQL Server container via Docker Compose.
  4. Connection String Setup
    Injects the correct connection string into Umbraco’s configuration, ready for local development.

Contributing

Contributions are welcome! Submit a pull request or open an issue on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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. 
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
2.0.2 0 2/3/2025
2.0.1 68 1/27/2025
2.0.0 55 1/27/2025
1.0.1 45 1/24/2025