3

Brand-spanking-new-to-Docker Mac user here. I have Docker installed locally (which I can verify by running docker -v). I have set up a private Docker Registry on a remote VM, say, myregistry.example.com:5000. I have set it up properly (I think) using TLS (root CA cert) as well as with Basic Auth.

I would like to pull down an image from the official Docker Registry, say, ubuntu, and push it to my remote/private registry.

But when I do a docker pull ubuntu, I get the following error message:

myuser@mymachine:/tmp/docker$docker pull ubuntu
Using default tag: latest
Post http:///var/run/docker.sock/v1.20/images/create?fromImage=ubuntu%3Alatest: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?

What’s going on here? And once I get past that, do I first need to login to my private registry to push ubuntu to it? Or will I be prompted for my Basic Auth credentials on push?

smeeb
  • 27,777
  • 57
  • 250
  • 447
  • 1
    Did you install Docker using Docker Toolbox, boot2docker, or Docker Machine? This isn't a problem talking to the registry but rather the Docker daemon either is not running or you didn't export the `DOCKER_HOST` environment variable on your local terminal. – Andy Shinn Sep 20 '15 at 16:48
  • Thanks @AndyShinn (+1) - I installed using the [Docker Toolbox](https://www.docker.com/toolbox). Any thoughts? Thanks again! – smeeb Sep 21 '15 at 12:35
  • Also [please see this followup question](http://stackoverflow.com/questions/32699709/setting-docker-host-after-docker-toolbox-mac-install), which I think is the root of my problem! – smeeb Sep 21 '15 at 16:03
  • sometimes it just need to call with sudo: `sudo docker pull ubuntu` – valerii ryzhuk Sep 24 '15 at 18:55

1 Answers1

0

This is because you are not configuring your current shell with `docker env'. You should run this command first.

eval "$(docker-machine env default)"
mainframer
  • 20,411
  • 12
  • 49
  • 68