.NET Tutorial - Hello World Microservice

Run Docker image

You can run your app in a container using the following command :

Command prompt
docker run -it --rm -p 3000:80 --name mymicroservicecontainer mymicroservice

Optionally, you can view your container running in a separate command promptterminal window using the following command:

Command prompt
docker ps

You can browse to the following URL to access your application running in a container: http://localhost:3000/WeatherForecast

The API endpoint returns JSON data containing weather forecast information

Congratulations! You've successfully created a small, independent service that can be deployed and scaled using Docker containers.

These are the fundamental building blocks of microservices.