2

This is a frustating situation where the docker build command fails frequently and without reason. There command being run is docker build -t imgtag .. The error goes away if I do the following:

  • rm ~/.docker/config.json
  • docker login
  • restart computer

I am using Ubuntu 20.04. I can't keep restarting my computer to work with docker. Any help appreciated. I don't want to build without cache every time Thank you.

[internal] load .dockerignore
  transferring context: 2B
[internal] load build definition from dockerfile
  transferring dockerfile: 1.69kB
ERROR [internal] load metadata for nvcr.io/nvidia/pytorch:23.03-py3
[internal] load metadata for nvcr.io/nvidia/pytorch:23.03-py3:
dockerfile:2
   2 | >>> FROM nvcr.io/nvidia/pytorch:23.03-py3
   3 |
   4 |     SHELL ["/bin/bash", "-c"]
ERROR: failed to solve: failed to fetch anonymous token: unexpected status: 401 Unauthorized
ste_kwr
  • 820
  • 1
  • 5
  • 21

0 Answers0