Getting “This assembly was expected to be in the local runtime” store when publishing to a Docker service

After having updated some ASP.NET Core Nuget packages, this may happen on the target Docker container instance:


 

This can be solved by editing the project file to include:

 

This makes the dotnet publish to bundle all the required files.

Run MongoDB in a Docker container on Docker for Windows

Just a note to self on how to run a MongoDB instance using Docker for Windows.

Create a volume to persist the Mongo database:

 

 

The run a MongoDB instance: