Update time: I finally gave up and opened an account at a Docker hosting service. When running my docker there, I also received an exception, but there the exception was a lot more descriptive:
Unhandled Exception: System.UnauthorizedAccessException: Access to the path '/proc/1/map_files' is denied. ---> System.IO.IOException: Operation not permitted,
at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher(),
at System.IO.FileSystemWatcher.RunningInstance..ctor(FileSystemWatcher watcher, SafeFileHandle inotifyHandle, String directoryPath, Boolean includeSubdirectories, NotifyFilters notifyFilters, CancellationToken cancellationToken),
at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName),
at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed(),
at System.IO.FileSystemWatcher.StartRaisingEvents(),
at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value),
at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter),
at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer),
at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source),
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors),
at ChangeCore.Program.Main(String[] args) in F:\ChangeCore\ChangeCore\Program.cs:line 17,
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build(),
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build(),
at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder),
at System.IO.Enumeration.FileSystemEnumerator`1.FindNextEntry(),
at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext(),
--- End of inner exception stack trace ---
Googling that message gave me the following github issue: https://github.com/dotnet/dotnet-docker/issues/485
It seems that since a certain version of Docker, it seems necessary to add a WORKDIR to the Dockerfile, which I only did for the building of the application and not the running.
So, problem solved.