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
When I published my project using the dotnet publish command, it generated a Docker image that worked, but I encountered "access denied" errors when creating folder.
And I was trying to do chmod 777 ./MyFolder
To resolve this, I created a Dockerfile and build it in visual studio.
However after it, the container exits with code 0 and does not provide any logs or error messages. This issue occurs whether I use Docker Compose or docker run.
And I was thinking that my docker run was not right but how to make it better i used this.
#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.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 ["WebApplication22.csproj", "."]
RUN dotnet restore "./WebApplication22.csproj"COPY . .
WORKDIR"/src/."RUN dotnet build "./WebApplication22.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./WebApplication22.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApplication22.dll"]
docker run -p 8080:8080 -p 8081:8081 webapplication22:dev
webapplication22:dev is empty razor pages application
The text was updated successfully, but these errors were encountered:
When I published my project using the
dotnet publish
command, it generated a Docker image that worked, but I encountered "access denied" errors when creating folder.And I was trying to do
chmod 777 ./MyFolder
To resolve this, I created a Dockerfile and build it in visual studio.
However after it, the container exits with code 0 and does not provide any logs or error messages. This issue occurs whether I use Docker Compose or docker run.
And I was thinking that my docker run was not right but how to make it better i used this.
And docker info
Using Windows and net8.0
docker run -p 8080:8080 -p 8081:8081 webapplication22:dev
webapplication22:dev is empty razor pages application
The text was updated successfully, but these errors were encountered: