Is it possible to use Docker for a modularized ASP NET Core web service

I am very new to docker and am trying to work out whether and how docker will meet our requirements.

We are developing a completely new web based application from the ground up to replace an existing desktop application.
We have chosen ASP Net Core as the primary back-end technology with a React based front-end.

We feel that the application can be roughly divided into 4 main components:

  • Identity Server - to provide authentication services
  • API Server - main application services
  • Client - Client side html and script
  • Database - MySql, SQL Server or other database

On the face of it, each of these appears to be a perfect fit for a Docker container.

The API server however is somewhat more complicated.
To make the server easier to customise, we are dividing the main functionality into a series of modules that are dynamically discovered and loaded at runtime. This relies on the Net Core Dependency Injection framework to create instances from whichever module implements the required functionality.
This has the following advantages:

  • Only those modules required to meet a customers requirements need to be installed.
  • In most cases a module can be updated without changing any other modules
  • A customer specific variant of a module can be installed to replace or supplement a core module

This is where the problems start.
As I understand it, docker containers are completely self contained and cannot pull in components from other containers. This makes it very difficult to provide a custom set of modules for the server.
I have considered a number of approaches, but I have limited knowlege of what is possible with Docker:

  • Create an image that has all the modules included
    We are trying to avoid shipping all modules. This would would have to create a custom image for each customer to handle module substitutions.
  • Put the modules in a Volume or other area outside the container
    As I understand it, this goes completely against the docker concept and may not be permitted on some platforms.
  • Create images for Core and each module that are combined at install time
    I think this may be the best solution if it is possible.
    Core would be built with the runtime environment
    Modules would be built with an empty base
    Install image would be built from Core and adding the modules as layers

I welcome any suggestions as to the best strategy and how it could be implemented in practice.

Thank you,
Alban