Getting connection reset while accessing azure container instance
Hi All,
I have created one docker image using dot net core and successfully pushed the image in container registry. After that I have published the same image in container app and container instance. I am not getting any issue in container app, but getting "the connection was reset" while accessing container instance.
PFB Docker file
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["MyAPI/MyAPI.csproj", "MyAPI/"]
RUN dotnet restore "./MyAPI/MyAPI.csproj"
COPY . .
WORKDIR "/src/MyAPI"
RUN dotnet build "./MyAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./MyAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MyAPI.dll"]
My Container instance properties
- OS type Linux
- IP address 130.107.39.53 (Public)
- SKU Standard
- Azure Spot -
- FQDN secondapp.f3creyh2cfg6gjhu.canadacentral.azurecontainer.io
- DNS name label scope reuse Tenant
- DNS name label secondapp
- Ports 80, 8080, 8081
- Restart policy On failure
- Container count 1
- Key management Microsoft-managed keys (MMK)
Please assist
Thanks in advance