From 1c31507c1908c152ed48d5acf50d7cf271795e4d Mon Sep 17 00:00:00 2001 From: Sander Datema Date: Fri, 16 Dec 2022 16:43:06 +0100 Subject: [PATCH] Fix container not running on odd distributions (like Unraid) This is a fix I found on StackOverflow: https://stackoverflow.com/a/71399650/776118 --- src/FakeRelay.Web/Program.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/FakeRelay.Web/Program.cs b/src/FakeRelay.Web/Program.cs index 332f894..2b8ba54 100644 --- a/src/FakeRelay.Web/Program.cs +++ b/src/FakeRelay.Web/Program.cs @@ -2,7 +2,12 @@ using FakeRelay.Core; using FakeRelay.Web.Services; using Microsoft.AspNetCore.HttpOverrides; -var builder = WebApplication.CreateBuilder(args); +var webApplicationOptions = new WebApplicationOptions +{ + ContentRootPath = AppContext.BaseDirectory, + Args = args, +}; +var builder = WebApplication.CreateBuilder(webApplicationOptions); Config.Init(builder.Configuration.GetValue("CONFIG_PATH")); // Add services to the container.