Reputation: 1242
I have about 4-5 microservices running in docker along with an api-gateway. I cant seem to get VS2022 to hit the breakpoints. I have the debug mode enabled in all the docker files.
Apigateway dockerfile
# Use official .NET 9 runtime as base
FROM mcr.microsoft.com/dotnet/aspnet:9.0.2 AS base
WORKDIR /app
EXPOSE 3000
# Build stage
FROM mcr.microsoft.com/dotnet/sdk:9.0.102 AS build
WORKDIR /src
COPY ["ApiGateway/ApiGateway.csproj", "ApiGateway/"]
RUN dotnet restore "ApiGateway/ApiGateway.csproj"
# Copy and build the app
COPY . .
WORKDIR "/src/ApiGateway"
ARG Mode=Debug
RUN echo "$Mode"
RUN dotnet publish -c $Mode -o /app/publish
# Final runtime container
FROM base AS final
WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "ApiGateway.dll"]
The other dockerfiles are exactly similar except for the name of the microservice.
The client app is Blazor Web app and it runs outside the docker and the breaktpoints for it are hit fine.
Upvotes: 0
Views: 14