Docker
Error: failed to solve with frontend
dockerfile.v0: failed to create LLB definition: the Dockerfile cannot be empty
Solution: first save the file with ctrl+s and then run docker build
Dockerfile oder myfile.docker
für Asp .Net 7 Web API
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT [ "dotnet","PlatformService.dll" ]
|