Pull Artifactory Docker Images

2019-08-17 01:08发布

问题:

I downloaded artifactory 6.6.0 on remote desktop with ip (x.x.x.x) and connect to port 8081.

I can connect to artifactory from my computer http://x.x.x.x:8081/artifactory. I have docker client on my computer but I don't have docker on remote desktop.

I have virtual docker repository named "docker".

I want to login by docker client to my docker repository on artifactory -> "docker login " and then pull images in this repository.

How can I log in and pull images from artifactory? Notice I don't have SSL so I'm using HTTP.

回答1:

First: docker login related to Artifactory -> Configurations -> HTTP Settings I used "Docker access method" as "Repository path"

docker login -u admin -p **** x.x.x.x:8081

Second: Since i use HTTP, this ip "x.x.x.x:8081" should be added to "insecure-registries" in Docker client.

or just add it to insecure registries in ~/.docker/config.json like below:

   {
    "auths": {
        "x.x.x.x:8081": {}
    },
    "HttpHeaders": {
        "User-Agent": "Docker-Client/18.09.0 (windows)"
    },
    "credsStore": "wincred"
}

and then restart docker