Docker image pull error from public registry - docker

I had a docker desktop installed on Mac OS. Everything was working great until I installed a recent update. Now, getting the following error.
> docker pull public.ecr.aws/nginx/nginx:1.21-alpine
Error response from daemon: pull access denied for public.ecr.aws/nginx/nginx, repository does not exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.
I did try after login to docker, I tried restarting, cleanup all docker data, factory reset, Uninstalled and installed a latest version. Nothing works.
However the same command works on different machine.

Needed to logout from public ecr
docker logout public.ecr.aws
Ref: https://docs.aws.amazon.com/AmazonECR/latest/public/public-troubleshooting.html

Related

Unable to pull image from ghcr

For two days now I can't pull any image from the github container registry. This happens in both public and private images. I have tried with both cmd and windows terminal without success. From the docker hub, however, I pull normally.
The command I use is this:
docker pull ghcr.io/someorg/someimage:sometag
and the error i get is this:
Error response from daemon: Head "https://ghcr.io/v2/someorg/someimage/manifests/sometag": denied: denied
It just says "denied" without explaining "why"... All I found after a lot of searching was an issue on github which says it was a platform issue which has been resolved.
Since the images you are trying to pull are public and you get that error, it is safe to assume that you are logged in with an access token that no longer exists (because you probably deleted it or it expired).
Given this, you have to remove login credentials for ghcr.io using the following command:
docker logout ghcr.io
and either log in again with an existing access token or don't log in at all.
The pull command should then work.

Docker Desktop won't pull image

After updating Docker Desktop to the latest version (v4.14.1), pulling images from Docker Hub no longer works, although I am logged in.
> docker pull alpine
Using default tag: latest
[2022-11-25T15:24:57.304539600Z][docker-credential-desktop][W] Windows version might not be up-to-date: The system cannot find the file specified.
Error response from daemon: pull access denied for alpine, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
I've performed the login using the cli too, but still, the same Windows version might not be up-to-date error pops up.
Well, apparently at some point, Docker decided to change the name of the credentials' provider variable in the ~/.docker/config.json from credsStore to credStore. So the correct config file should be:
{
"auths": {
"https://index.docker.in/v1/": {}
},
"credStore": "desktop.exe"
}

Failed to authorize when pushing docker image to GCR

I got stuck when pushing my docker image to Google Container Registry. There is always this error message:
failed to authorize: failed to fetch anonymous token: unexpected status: 401 Unauthorized
I did run gcloud auth login with my company email (user account not service account)
I did run gcloud auth configure-docker
Tools version:
docker: 20.10.21
gcloud: 410.0.0
Everything is okay with my company's Mac Mini and my personal Linux Desktop but my Macbook. (the same account and steps to setup)
Does anyone know about this problem? Please give me an instruction. Thank you in advance.
Create a service account : That requires permission and roles to write to the Cloud Storage bucket containing the container registry. Granting the service account either the project editor role or write access to the bucket (via ACL) solves the issue. The latter should be preferable since the account doesn't receive wider permissions than it needs.
To push the images to GCR follow the below steps:
1.Add a registry
2.Check the permissions
3.Choose the authentication method
4.Tag
5.Tag the local image with the registry name
6.Push tagged image to gcr
Refer to the link Pushing and Pulling images for more information.
If you encounter any issues with Docker on Mac, try below steps:
Run the docker-machine restart default command in the Mac terminal to restart the Docker daemon.
Ensure that "Securely store docker logins in macOS keychain" is not enabled in Docker's Preferences menu.
Ensure that you're running the most recent Docker version.

docker pull requested access to the resource is denied from hub.docker.com

This sounds like a silly problem but I'm not able to pull anything from my own private DockerHub repos.
zsh: docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: my-username
Password:
Login Succeeded
zsh: docker pull my-username/my-app:latest
Error response from daemon: pull access denied for my-username/my-app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
I checked if I misspelt something or don't have the access rights. But even in Docker Desktop, I get the same error when trying to pull an image from the "Remote Repositories"-tab list within the "Images"-menu. When I navigate to the hub.docker.com page I'll see the image.
Havn't found any working solution on the internet.
Thanks!
The simple reson is: you have reached the limit of private repos.
You might want to upgrade, switch to another provider or build your own local image repository.
I answer my own question, so anyone googeling around and trying to fix this issue can find this solution. I upgraded my plan to Docker Pro and continued using DockerHub without any issues.

Running docker first test

I am a beginner to the docker technology, as I have downloaded it, the program doesn't launch. i Tested Docker --version and shows Docker version 18.06.1-ce, build e68fc7a.
I tried docker run hello-world as it appears in the tutorial, it shows the following error that i couldn't understand and fix, :
Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.
any guide and better tutorial for fixing such problems and get improved with following step by step the technology and work on it?
Edit: Problem Solved!
in command line i have login and it was the key point where i get to run the test image.
Try create an dockerhub account. Then in your machine, type docker login. Then login by dockerhub account you just create... This should work.

Resources