A few weeks ago I posted Step by step: ASP.NET Core on Docker were I showed how to build and run a Docker image with an ASP.NET Core application.

Today I bring you: Step by step: Scale ASP.NET Core with Docker Swarm so you can scale out or in the same application.

Assuming you have Docker 1.12 or later installed and running, follow this steps:

1. Create a dockerfile
2. Create a Docker image
3. Initialize a Swarm
4. Create a Docker Service
5. Scale up your application
6. Scale down your application
7. Optional: Remove the service

You can get a copy of the docker file here: https://github.com/cmendible/dotnetcore.samples/tree/master/docker.helloworld

Hope it helps!

4 thoughts on “Step by step: Scale ASP.NET Core with Docker Swarm

  1. Hey Carlos, how are u?

    Thanks for sharing this.

    I found a small error, the code are exposing port 80 and docker configured to 5000.

Leave a Reply

Your email address will not be published. Required fields are marked *