0

I have created a .NET 8 web API and deployed in a container instace.

When I try to access the application, I am unable to access from container instace.

enter image description here

Docker file

*FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base

USER app

WORKDIR /app

EXPOSE 8080

EXPOSE 8081

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build

ARG BUILD_CONFIGURATION=Release

WORKDIR /src

COPY ["Net8/Net8.csproj", "Net8/"]

RUN dotnet restore "./Net8/Net8.csproj"

COPY . .

WORKDIR "/src/Net8"

RUN dotnet build "./Net8.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish

ARG BUILD_CONFIGURATION=Release

RUN dotnet publish "./Net8.csproj" -c $BUILD_CONFIGURATION -o /app/publish

/p:UseAppHost=false

FROM base AS final

WORKDIR /app

COPY --from=publish /app/publish .

ENTRYPOINT ["dotnet", "Net8.dll"]*

Is there any limitation with .NET?

1 Answer 1

0

There is no limitation in .NET, but you can create Docker container without any exposed ports or remap port.

To simplify working with Docker containers you can use .NET Aspire

Sign up to request clarification or add additional context in comments.

6 Comments

Have you tried deploying .NET 8 api in container instance and able to access.
Yes. Twice or more per day.
Can you provide your docker file sample and container instace settings? I am facing issues
@BalanjaneyuluK pastebin.com/6SmnETLK
I am still unable to access the deployed application
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.