You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Introduced Dockerfile for building the web application.
- Added .dockerignore to exclude unnecessary files from Docker context.
- Updated CI workflow to build and push Docker images to Azure Container Registry.
- Enhanced CI/CD workflow to deploy Docker images to Azure Web App.
- Modified launchSettings.json to support Docker configuration.
- Updated webapp01.csproj to include Docker-related properties and dependencies.
# See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
2
+
3
+
# This stage is used when running from VS in fast mode (Default for Debug configuration)
4
+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
5
+
USER $APP_UID
6
+
WORKDIR /app
7
+
EXPOSE 8080
8
+
EXPOSE 8081
9
+
10
+
11
+
# This stage is used to build the service project
12
+
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
13
+
ARG BUILD_CONFIGURATION=Release
14
+
WORKDIR /src
15
+
COPY ["webapp01.csproj", "."]
16
+
RUN dotnet restore "./webapp01.csproj"
17
+
COPY . .
18
+
WORKDIR"/src/."
19
+
RUN dotnet build "./webapp01.csproj" -c $BUILD_CONFIGURATION -o /app/build
20
+
21
+
# This stage is used to publish the service project to be copied to the final stage
22
+
FROM build AS publish
23
+
ARG BUILD_CONFIGURATION=Release
24
+
RUN dotnet publish "./webapp01.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
25
+
26
+
# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
0 commit comments