I've been running docker-compose build for days, many times per day, and haven't changed my DOCKERFILEs or docker-compose.yml. Suddenly an hour ago I started getting this:
Building frontdesk-api
failed to get console mode for stdout: The handle is invalid.
[+] Building 10.0s (3/4)
=> [internal] load build definition from Dockerfile 0.0s
[+] Building 10.1s (4/4) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for mcr.microsoft.com/dotnet/sdk:5.0. 10.0sailed to do request: Head https://mcr.microsoft.com/v2/dotnet/sdk/manifests/5.0.201-buster-slim: dial tcp: lookup mcr.microsoft.com on 192.168.65.5:53:
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:5.0-bust 0.0s
------
> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:5.0.201-buster-slim:
------
ERROR: Service 'frontdesk-api' failed to build
Things I've tried:
docker rm -f $(docker ps -a -q)
docker login
Here is the DOCKERFILE:
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0.201-buster-slim AS build
WORKDIR /app
# run this from repository root
COPY ./ ./
#RUN ls -lha .
RUN echo 'Building FrontDesk container'
WORKDIR /app/FrontDesk/src/FrontDesk.Api
#RUN ls -lha .
RUN dotnet restore
RUN dotnet build "FrontDesk.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "FrontDesk.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "FrontDesk.Api.dll"]
How can I get my build working again?
the solution that worked for me is to delete the .docker/config.json by running
rm ~/.docker/config.json
then docker-compose up your-services
should work
mcr.microsoft.com is down at the moment
I'm receiving several different errors when pulling:
% docker pull mcr.microsoft.com/dotnet/sdk:5.0
Error response from daemon: Get https://mcr.microsoft.com/v2/: Service Unavailable
% docker pull mcr.microsoft.com/dotnet/sdk:5.0
5.0: Pulling from dotnet/sdk
received unexpected HTTP status: 500 Internal Server Error
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With