So I have a architecture with several distinct 'back-end' asp.net core web api's. I am using Masstransit and rabbitmq to facilitate inter-container communication. With MassTransit, the services need a sort of contract between them (just simple classes), which if the system is deployed locally or on a server is fine, but with docker containers this is has proven to be a problem.
I have tried googling a lot, but there seems to be very little asp.net core, and especially masstransit, combined with docker documentation.
So question is:
How do I have to separate containers, written with asp.net core, share messaging contracts (i.e. model classes)?
I thought about creating a nugget package. This would work, but it seems like a pretty inelegant solution + contracts would be public (not a big deal, but still probably not great).
lastly, i orchestrate the services with docker-compose - if that has relevance for your answer.