Error Pulling private docker repository from mac Boot2Docker - docker

From my mac, successfully install Boot2Docker and everything seems to work well...
However when I try to pull a remote private repository using the following command:
sudo docker pull xxxx/yyyy I get this error message:
FATA[0000] Post http:///var/run/docker.sock/v1.16/images/create?fromImage=xxxx%2Fdev%3Alatest: dial unix /var/run/docker.sock: no such file or directory
When I try using this command docker pull xxxx/yyyy I got this error message:
Pulling repository xxxx/yyyy
FATA[0000] Error: image xxxx/yyyy:latest not found
Can anyone already experiment this error message from mac Boot2Docker ? Yes please let me know how to fix it.
Thanks.

Troubleshooting steps
Try restarting boot2docker
boot2docker restart
ssh into boot2docker boot2docker ssh and then see if the docker process is running ps aux | grep -i '/usr/local/bin/docker -d -D' | grep -v grep
Can you do a docker pull nginx from inside boot2docker? This is to test if docker daemon is functional from inside the boot2docker VM
Check if the docker daemon unix socket file exists inside the boot2docker VM ls /var/run/docker.sock
These steps should help you figure out whats wrong.

Related

Docker installation on Mac m1

I am trying to install Docker desktop on Mac m1 but after installation dockers asks to execute following command.
docker run -d -p 80:80 docker/getting-started
But, it gives following error
Unable to find image 'docker/getting-started:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": read tcp 192.168.65.4:58764->192.168.65.5:3128: read: connection reset by peer.
See 'docker run --help'.
Why is it not pulling docker data?
(Sorry for the miss... going to try this again)
Try docker exec command before your command.
Like this docker exec docker run -d -p 80:80 docker/getting-started
"Tried using the docker exec command and it appears to have worked OK with two different ubuntu instances. Did not try Docker Desktop.
It kind of looks like there is a problem with Docker Desktop manipulating Terminal.app.
I’m using the macOS default zshell."
https://forums.docker.com/t/problems-getting-started/116487/9

Docker container log file missing

On running the command docker container ps -a | grep my_app the docker is showing that its in running status, but the moment I try to see the logs using docker logs -f 858509fc385f where 858509fc385f is the container_id for my_app container. It gives the following error :-
Error grabbing logs: open /var/lib/docker/containers/858509fc385f5ea264f7fd729d9bab32a99742cd0743dc253dcf8a3967ad195c/858509fc385f5ea264f7fd729d9bab32a99742cd0743dc253dcf8a3967ad195c-json.log: no such file or directory
The host machine is CentOS Linux release 7.6.1810.
The docker version details are :-
Any kind of help would be appreciated.

Cannot execute Docker Commands in UNIX environment

I installed the Docker installation to my UNIX (macOS), once I execute simple commands like,
$ docker run ubuntu
it shows following error prompted in terminal:
docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
I tried in several docker commands, but docker daemon throws the mentioned error message.
This is issue of Docker Engine startup not linked with docker demons, I resolved this problem by Reset to Factory Settings option in Docker Troubleshooting pane

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

we are getting this error while trying to run docker commands. E.g.:
$ docker image ls
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json: dial unix /var/run/docker.sock: connect: permission denied
So we followed the steps here but the problem remains. Then we saw this question where it is advised
You have to restart the docker daemon, otherwise it won't let members
of the docker group to control the docker daemon
but are having trouble restarting the service
$ sudo service docker restart
Failed to restart docker.service: Unit docker.service not found.
we are using
$ docker -v
Docker version 18.06.1-ce, build e68fc7a
on
$ uname -a
Linux jnj 4.15.0-1036-azure #38-Ubuntu SMP Fri Dec 7 02:47:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
the docker group has been successfully created and we are member of it
$ grep docker /etc/group
docker:x:1001:siddjain
Also we did log out and log back in. we are able to run docker commands with sudo. Also
$ sudo snap services
Service Startup Current Notes
docker.dockerd enabled active -
can anyone help us?
The solution was to restart docker daemon using snap (since that is how we installed docker)
siddjain#jnj:~$ sudo snap stop docker
Stopped.
siddjain#jnj:~$ snap start docker
error: access denied (try with sudo)
siddjain#jnj:~$ sudo snap start docker
Started.
After that we are able to run docker commands without having to sudo
siddjain#jnj:~$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
siddjain#jnj:~$
Our joy was shortlived as we immediately ran into another error after this one when we tried to run another container.
mkdir /var/lib/docker: read-only file system
To fix it we had to uninstall and reinstall docker again - this time from the official documentation as described here

Docker experimental version on Red Hat

I have a Red Hat machine on an AWS cloud. I installed Ansible and Docker (experimental version as the community edition cannot be installed now on Red Hat). Now I am runnig a simple command to check whether Docker works:
ansible local -m shell -a "docker pull hello-world"
I'm getting the following error:
localhost | FAILED | rc=1 >>
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/Cannot connect to the Docker daemon. Is the docker daemon running on this host?
When I use
sudo ansible local -m shell -a "docker pull hello-world"
localhost | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\r\n",
"unreachable": true
}
I have tested Ansible by copying a file into local host and it works fine whereas with Docker I'm facing this issue. Is there anything I am missing or anything that needs to be setup for Docker's experimental version?
You don't want to run ansible through sudo but tell ansible that it should run the command using sudo. That can be done by adding the -s flag
ansible local -s -m shell -a "docker pull hello-world"

Resources