简体   繁体   中英

docker login private registry succeeded docker run failed

Try to login to login to my private compagny docker (jfrog) registry, it was working...

[rabxxxx.xxx@vmxxx]$ docker login registry.x.xx-xx-xxxxx.xx.xx.xxxx.net -u xxx
Password:
WARNING! Your password will be stored unencrypted in /home/rabxxxx.xxx/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
[rabxxxx.xxx@vmxxx]$ docker run -p 8080:8080 -p 50000:50000 jenkins
Unable to find image 'jenkins:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded.
See 'docker run --help'.

cat /etc/docker/daemon.json

{
  "insecure-registries": ["registry.x.xx-xx-xxxxx.xx.xx.xxxx.net"],
  "registry-mirrors": ["registry.x.xx-xx-xxxxx.xx.xx.xxxx.net"]
}

Please can you tell what I must check and why it's return me this

 Error response from daemon: Get "https://registry-1.docker.io/v2/"

Thx

Your company registry did not cache image from official registry. Try to make it auto cache or pull the jenkins image from docker official registry and push to your company registry then you can use it. I will suggest you to make the company registry auto cache, when the registry exists in your private registry, just use it, if did not exists, cache from the official registry.

docker pull registry.x.xx-xx-xxxxx.xx.xx.xxxx.net/jenkins` Using default tag: latest Error response from daemon: manifest for registry.repo.proxy-dev-forge.asip.hst.fluxus.net/jenkins:latest not found: manifest unknown: The named manifest is not known to the registry.

( same with /library/jenkins ]

When you docker run jenkins , docker will expand that to docker.io/library/jenkins , where docker.io is Docker Hub and the actual underlying registry server is registry-1.docker.io . When you define a mirror for that, you need to keep the repository names the same, so not registry.example.org/jenkins , but registry.example.org/library/jenkins .

In your case, it appears your mirror has neither of those, making it an incomplete mirror, assuming it's a mirror at all. But you don't really want to run the library/jenkins image anyway, since they've indicated it's deprecated with a recommendation to use the jenkins/jenkins repo instead (likely maintained by Cloudbees).

Please can you tell what I must check and why it's return me this

Error response from daemon: Get "https://registry-1.docker.io/v2/"

Mirroring in docker is a best effort. If the mirror fails for any reason, or you try to do a push instead of a pull, docker will fall back to going direct to Docker Hub.

If you only want to talk to your local registry, then you should put that registry in all your image names. This is particularly important if your mirror doesn't match Docker Hub and you make assumptions based on your local registry. In those cases, the same definition for an image on one machine may run very different code if the network has an issue or you deploy on a different machine without the mirroring specification. RedHat documented many of these risks after pushing hard to add the ability to overload the top level namespace, and we had a wave of dependency confusion attacks impact other software repositories.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM