title: MS dotnet core container images failed to pull, Error: CTC1014
body: <p>I was trying to build a new image for a small dotnet core 3.1 console application. I got an error:</p>
  <blockquote>
  <p>failed to solve with frontend dockerfile.v0: failed to create LLB
  definition: failed to copy: httpReadSeeker: failed open: failed to do
  request: Get
  <a href="https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&amp;P2=1&amp;P3=1&amp;P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&amp;se=2021-07-28T13%3A52%3A01Z&amp;sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&amp;sp=r&amp;spr=https&amp;sr=b&amp;sv=2016-05-31&amp;regid=42012bb2682a4d76ba7fa17a9d9a9162" rel="nofollow noreferrer">https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&amp;P2=1&amp;P3=1&amp;P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&amp;se=2021-07-28T13%3A52%3A01Z&amp;sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&amp;sp=r&amp;spr=https&amp;sr=b&amp;sv=2016-05-31&amp;regid=42012bb2682a4d76ba7fa17a9d9a9162</a>:
  x509: certificate has expired or is not yet valid</p>
  </blockquote>
  <p>I have checked an old dotnet program which my dockerfile was working perfectly. I got the same error. Then, I jumped to Docker Hub and checked the MS Images to see that all MS images have been updated for an hour. And then they have been updated once again, 10 Minutes ago xD. However, I still cannot pull the base images of mcr.microsoft.com/dotnet/runtime:3.1 and mcr.microsoft.com/dotnet/sdk:3.1. My whole Dockerfile is:</p>
  <pre><code>FROM mcr.microsoft.com/dotnet/runtime:3.1 AS base
  WORKDIR /app
  
  FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
  WORKDIR /src
  COPY [&quot;Kafka-dotnet-consumer/Kafka-dotnet-consumer.csproj&quot;, &quot;Kafka-dotnet-consumer/&quot;]
  RUN dotnet restore &quot;Kafka-dotnet-consumer/Kafka-dotnet-consumer.csproj&quot;
  COPY . .
  WORKDIR &quot;/src/Kafka-dotnet-consumer&quot;
  RUN dotnet build &quot;Kafka-dotnet-consumer.csproj&quot; -c Release -o /app/build
  
  FROM build AS publish
  RUN dotnet publish &quot;Kafka-dotnet-consumer.csproj&quot; -c Release -o /app/publish
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app/publish .
  ENTRYPOINT [&quot;dotnet&quot;, &quot;Kafka-dotnet-consumer.dll&quot;]
  </code></pre>
  <p>and the complete error log is:</p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   CTC1014 Docker command failed with exit code 1.
  #1 [internal] load build definition from Dockerfile
  #1 sha256:356bc2781f52b021d6dc2eefeef3212c983066d4fe3637fe7928c8165f181c52
  #1 DONE 0.0s
  
  #1 [internal] load build definition from Dockerfile
  #1 sha256:356bc2781f52b021d6dc2eefeef3212c983066d4fe3637fe7928c8165f181c52
  #1 transferring dockerfile: 826B done
  #1 DONE 0.0s
  
  #2 [internal] load .dockerignore
  #2 sha256:158b62c61546176b0f8a68c34f4aed7fe8e5f979cc578672dacd3c07aff01eb1
  #2 transferring context: 35B done
  #2 DONE 0.0s
  
  #3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:3.1-alpine
  #3 sha256:9c4e2456483bc5a0fda4bf0466bb996bef09b180bf33a44ede0bd988c1be9178
  #3 ...
  
  #4 [internal] load metadata for mcr.microsoft.com/dotnet/runtime:3.1-alpine
  #4 sha256:46a3f71ff7a02c9ad1111e95e06323b127c541ea25dc1bca0750bc3a2ea917ca
  #4 ERROR: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&amp;P2=1&amp;P3=1&amp;P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&amp;se=2021-07-28T13%3A52%3A01Z&amp;sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&amp;sp=r&amp;spr=https&amp;sr=b&amp;sv=2016-05-31&amp;regid=42012bb2682a4d76ba7fa17a9d9a9162: x509: certificate has expired or is not yet valid
  
  #3 [internal] load metadata for mcr.microsoft.com/dotnet/sdk:3.1-alpine
  #3 sha256:9c4e2456483bc5a0fda4bf0466bb996bef09b180bf33a44ede0bd988c1be9178
  #3 CANCELED
  ------
   &gt; [internal] load metadata for mcr.microsoft.com/dotnet/runtime:3.1-alpine:
  ------
  failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&amp;P2=1&amp;P3=1&amp;P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&amp;se=2021-07-28T13%3A52%3A01Z&amp;sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&amp;sp=r&amp;spr=https&amp;sr=b&amp;sv=2016-05-31&amp;regid=42012bb2682a4d76ba7fa17a9d9a9162: x509: certificate has expired or is not yet valid Kafka-dotnet-consumer   C:\Ziad\repos\vdpm-datagrid\Kafka-dotnet-consumer\Kafka-dotnet-consumer\Dockerfile  1   
  </code></pre>
  <p>Any ideas?</p>