0

I am using docker in Linux ol7. I have installed a docker successfully. But when I try to pull images from the docker hub I am getting the below error.

[root@xxxxx ~]# docker run hello-world

Unable to find image 'hello-world: latest' locally
docker: error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/images/create?fromImage=hello-world&tag=latest: EOF.
See 'docker run --help'.

Docker Version I am using - Docker version 18.09.1-ol, build e32a1bd

Maroun
  • 94,125
  • 30
  • 188
  • 241
Azmy
  • 181
  • 3
  • 17
  • 1
    did you tried with `docker run registry.hub.docker.com/library/hello-world` – Adiii Oct 16 '19 at 11:06
  • Please restart docker and try again. – DUDANF Oct 16 '19 at 11:06
  • @Adiii yes this is working fine. Thank you. But any reason why when I use docker run hello-world is not working. What should be done to avoid this any help? – Azmy Oct 16 '19 at 11:17
  • @daudnadeem i tried restarting but still the same issue please help if you know any reasons for this – Azmy Oct 16 '19 at 11:17
  • Can you make a simple Dockerfile ```FROM python:3``` and ```docker build -t 'test' .``` and ```docker run test``` – DUDANF Oct 16 '19 at 11:22
  • This will also download from docker hub. If this gives an error, can you make sure you are logged into Docker? If this doesn't work either, you may have to play around with the DNS settings/proxy. Like [here](https://github.com/docker/hub-feedback/issues/1627#issuecomment-432803733) – DUDANF Oct 16 '19 at 11:25
  • @daudnadeem this works fine without any issues – Azmy Oct 16 '19 at 11:44
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/200952/discussion-between-daudnadeem-and-azmy). – DUDANF Oct 16 '19 at 11:46

1 Answers1

1

Try to pass to full docker registry offical URL, from the error it seems like it looking on host machine Docker socket docker.sock or somewhere else but not on offical registry.

docker run registry.hub.docker.com/library/hello-world

You can explore this and this to deal with registry url.

Adiii
  • 54,482
  • 7
  • 145
  • 148