Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5970

error building docker image for dotnet8 application

$
0
0

i'm trying to build a docker container in a Ubuntu Hyper-v virtual machine, this is my docker file:

# DockerfileFROM mcr.microsoft.com/dotnet/aspnet:8.0 AS baseUSER appWORKDIR /appEXPOSE 8080EXPOSE 8081FROM mcr.microsoft.com/dotnet/sdk:8.0 AS buildARG BUILD_CONFIGURATION=ReleaseWORKDIR /srcCOPY ["testdotnet/testdotnet.csproj", "testdotnet/"]RUN dotnet restore "./testdotnet/./testdotnet.csproj"COPY . .WORKDIR "/src/testdotnet"RUN dotnet build "./testdotnet.csproj" -c $BUILD_CONFIGURATION -o /app/buildFROM build AS publishARG BUILD_CONFIGURATION=ReleaseRUN dotnet publish "./testdotnet.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=falseFROM base AS finalWORKDIR /appCOPY --from=publish /app/publish .ENTRYPOINT ["dotnet", "testdotnet.dll"]

runnig docker build -t testdotnet . give this error:

=> ERROR [internal] load metadata for mcr.microsoft.com/dotnet/sdk:8.0                                                                                                      10.1s => ERROR [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:8.0                                                                                                   10.1s------> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:8.0:------------> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:8.0:------Dockerfile:8--------------------   6 |     EXPOSE 8081   7 |        8 | >>> FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build   9 |     ARG BUILD_CONFIGURATION=Release  10 |     WORKDIR /src--------------------ERROR: failed to solve: mcr.microsoft.com/dotnet/sdk:8.0: failed to resolve source metadata for mcr.microsoft.com/dotnet/sdk:8.0: failed to do request: Head "https://mcr.microsoft.com/v2/dotnet/sdk/manifests/8.0": net/http: TLS handshake timeout

what i'm i missing ??


Viewing all articles
Browse latest Browse all 5970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>