How to Publish a .NET 6 API Container on Azure App Service

Deploying a container to Azure App Service is like putting a packed lunch into a lunchbox. Your lunch (the container) is already prepared with all the things you need to eat. The lunchbox (Azure App Service) is a special container that can hold and run your lunch (container).

The article comprises two distinct projects:

  • WeatherForecastAPI: This project serves as a straightforward Get API, offering information on five random weather forecasts. Importantly, it operates independently of any database dependencies.
  • WeatherForecastSQLAPI: This project, on the other hand, is a basic CRUD (Create, Read, Update, Delete) API. It facilitates the management of weather forecast data, allowing for the creation, modification, deletion, and retrieval of forecasts stored within a SQL Server database. Unlike the first project, this API relies on SQL Server for its functionality.

Prerequisite

  • Basic knowledge of .net web API 6.0
  • Basic knowledge of relational databases
  • Basic knowledge of networking concepts

Key Concepts

Docker

This is a platform used for developing and running applications. The main aim of docker ensure infrastructure are managed the same way as the application. Using docker, makes it easy to instantiate an application multiple times.

DockerFile

A Dockerfile includes commands that are used to generate docker images.

Relational Database

A relational database is a type of database that organizes and stores data in a structured way, using a tabular format.

Read more