Skip to content

Error while running docker build - sample grpc application #6223

Description

@mukthiarahamad

I have created a sample Grpc project with docker support and I am trying to create run the build command but the build command fails with below error.

docker build -t final . --progress=plain
#1 [internal] load build definition from Dockerfile
#1 sha256:b8ff9a930a5fd9cd27fd5e8814f79a8985978b84b4683d8b399aac266d1b29f6
#1 transferring dockerfile: 988B 0.0s done
#1 DONE 0.1s

#2 [internal] load .dockerignore
#2 sha256:e2b52ee6d28f145e15b48efcdefaafbfd433fc825162ca81fc0ff93900052a5b
#2 transferring context: 2B 0.0s done
#2 DONE 0.1s

#3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:3.1
#3 sha256:ce64eac29b07ebbf4d973b99e492aaf8ba85556a3d349a716d703b36362d10a7
#3 ERROR: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://southeastasia.data.mcr.microsoft.com/353485d638e24519ae59b2c19249e31f-vd4vgzv6do//docker/registry/v2/blobs/sha256/39/397f9fc13f1cc630bb67dfb3ce67436e81bef757f49f9e75a08941aeb4723d87/data?P1=1620172599&P2=1&P3=1&P4=wqn3RgRodJ2eqV7vHytI2ChS7ZvTriLEm3mZlj6KeVw%3D&se=2021-05-04T23%3A56%3A39Z&sig=RrR44BImH5FWA%2F0WZLRM7THK5ZR8kAX6dSxqACQYn7A%3D&sp=r&spr=https&sr=b&sv=2016-05-31&regid=353485d638e24519ae59b2c19249e31f: EOF

#4 [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:3.1
#4 sha256:6cc59bb059858e4ec7070d9fc240ac93870aa8bdfd5679ab219e693360eb146a
#4 CANCELED

[internal] load metadata for mcr.microsoft.com/dotnet/sdk:3.1:


failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://southeastasia.data.mcr.microsoft.com/353485d638e24519ae59b2c19249e31f-vd4vgzv6do//docker/registry/v2/blobs/sha256/39/397f9fc13f1cc630bb67dfb3ce67436e81bef757f49f9e75a08941aeb4723d87/data?P1=1620172599&P2=1&P3=1&P4=wqn3RgRodJ2eqV7vHytI2ChS7ZvTriLEm3mZlj6KeVw%3D&se=2021-05-04T23%3A56%3A39Z&sig=RrR44BImH5FWA%2F0WZLRM7THK5ZR8kAX6dSxqACQYn7A%3D&sp=r&spr=https&sr=b&sv=2016-05-31&regid=353485d638e24519ae59b2c19249e31f: EOF

please find below the sample docker file

FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY ["GrpcService1/GrpcService1.csproj", "GrpcService1/"]
RUN dotnet restore "GrpcService1/GrpcService1.csproj"
COPY . .
WORKDIR "/src/GrpcService1"
RUN dotnet build "GrpcService1.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "GrpcService1.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "GrpcService1.dll"]

Kindly suggest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions