NServiceBus Samples with Docker Containers?

Besides Hosting endpoints in Docker Linux containers • NServiceBus Samples • Particular Docs (which focuses on .NET Core), are there any samples out there for hosting NServiceBus in a docker container in .NET “Classic”?

From the research I’ve done, it appears the microsoft/windowsservercore is not going to include MSMQ because tied to older technologies that would “badly break containers” (MSMQ-Server - Is it supported?)

So, I’m assuming something AMQP-friendly like RabbitMQ or Azure Storage Queues would need to be used for the transport.


Hi Michael,

Just an FYI MSMQ will be supported in Windows Containers



Daniel, thanks!


So, I guess there’s going to be support for MSMQ in NServiceBus .NET Core after all?

Looks like you need to sign up as a “Windows Insider” to use the preview build.

in order to run the image (Docker)
in Docker locally.

Seeing how these are the items to accept before becoming an “Insider”

  • The experimental and early prerelease software and services might not be tested.
  • You might experience crashes, security vulnerabilities, data loss, or damage to your device.
  • When the software is installed on a mobile device: (i) it is not intended as a substitute for your primary means of telecommunications; (ii) in some circumstances, you may not be able to place calls (including calls for emergency services); (iii) it may inadvertently damage your device rendering it inoperable; and (iv) you may experience increased data charges.
  • The Program collects and transmits data to Microsoft regarding activities on your device, including personal information; Microsoft shares some data with partners. See the Privacy Statement for more information.
  • You will receive communications about the program and related promotions. Once you’ve joined the program, to stop receiving such communications you must leave the program.

has anyone had problems with system stability when agreeing to these terms and conditions?

Just asking, as I have one machine, and that’s my work machine, and I need it to work… eh… work :wink:


@mgmccarthy @danielmarbach Do you have any sample application on ASP.Net framework 4.7.* which is running as window service in window docker container and processing NServiceBus messages sent over SQL transport?
I have tried to create the image for similar application and image is created successfully. I can see service is running into container as per the status of service but it is not processing NServiceBus messages sent from another container to NServiceBus using SQL transport. Can you please share any inputs?

I am using NServiceBus.Core (version :

I have below command in my docker file to install the service:
RUN New-Service -Name “"MyService”" -StartupType “"Manual”" -BinaryPathName “"C:\inetpub\wwwroot\MyService.exe”";

Then, I am using below command to Run the service
Start-Service “MyService”