Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Docker access denied

📅 2019-Sep-17 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ docker ⬩ 📚 Archive


Building a Docker image threw up this error:

$ docker build -f Dockerfile -t foobar
Sending build context to Docker daemon  1.115MB
Step 1/14 : FROM
Get unauthorized: HTTP Basic: Access denied


This usually means that your Docker does not have authorization to the registry you are referring to. The registry is usually the domain part of the URL above. You need to use the docker login command to successfully login to the registry, so that docker can save the credentials for you so that future docker pull from the registry will work.

For the Docker registry URL used above, the command would be:

$ docker login

Tried with: Ubuntu 18.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧