1

We have an on prem version of artifactory installed which can host a docker repository. I can browse the repository from chrome and there are some images hosted.

When i do docker login [dns of my reverse proxy], i get the prompt to supply my credentials which i do. and then i get the message 'Login Succeeded'

I then do a docker push [image name]:latest and this is output i get:

The push refers to repository [docker.io/library/[image name]]
4642eff80520: Preparing
[...truncated output...]
bcf2f368fe23: Waiting
denied: requested access to the resource is denied

Here it looks like it's going to some completely different repository to the one i logged in to? :

docker.io/library/[image name]

then when i do docker logout, i get the output

Not logged in to https://index.docker.io/v1/

I don't understand why it is not letting me push my image to the repository i logged in to?, is it because that's not the repository and it is just the reverse proxy server?

I am using Docker for Windows, output of docker version

Client: Docker Engine - Community
 Version:           18.09.2
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        6247962
 Built:             Sun Feb 10 04:12:31 2019
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.2
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       6247962
  Built:            Sun Feb 10 04:13:06 2019
  OS/Arch:          linux/amd64
  Experimental:     false
5
  • Deploy a registry server on Docker documentation. Did you include the path to your own registry in the push?
    – Seth
    Apr 5, 2019 at 12:38
  • I don't have a registry, why would this be needed? i want to push to a remote registry on the artifactory
    – zaf187
    Apr 5, 2019 at 14:28
  • ok so what i did was, tagged my image with the [dns of my reverse proxy]/[image name] then when i did docker push [dns of my reverse proxy]/[image name] it appeared in the artifactory repository :-\
    – zaf187
    Apr 5, 2019 at 15:17
  • That's what on that page under "Copy an image from Docker Hub to your registry" point 2. If you're not using the default registry you need to tell it which one to use. Consider turning it into an answer and accepting it.
    – Seth
    Apr 7, 2019 at 17:00
  • @Seth can you please supply the comment as an answer so i can mark it as accepted?
    – zaf187
    Apr 8, 2019 at 8:44

1 Answer 1

0

If you're running a custom registry to host your images you need to tell docker how to do this.

The documentation for docker push has an example as well as the documentation on how to run your own registry. You need to prefix the host to your image. The example given in the docker push documentation is as follows:

$ docker push registry-host:5000/myadmin/rhel-httpd

Depending on what version of docker you're running you might be able to change the default registry. At least according to this question on StackOverflow. Beware that this seem to have been discussed before and won't be a standard feature.

Another relevant StackOverflow question on how to push an image to a private repo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .