My Docker install has problems and no longer works properly. When I try to use docker export [containername].
I get the following error
FATA[0000] Get http://%2Fvar%2Frun%2Fdocker.sock/v1.18/containers/json: dial unix /var/run/docker.sock: connect: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
I would like to move the containers on this machine to a new machine that I have setup.
Is there a way to move the containers without using the CLI?
Not sure this is a CLI issue. Technically when you run a docker command it goes CLI > API > Docker daemon. Locally, the API is listening on a UNIX socket but your error says there's nothing listening on the socket. Is your Docker daemon running?
Related
After installing docker on a windows server i got the following error when pulling a image with docker run hello-world command:
Error response from daemon: Get https://hub.docker.com/v2/: dial tcp
52.6.16.15:443: connectex: No connection could be made because the target machine actively refused it.
The problem was that the proxy was blocking the request.
After some headaches, i finally got how to setup up proxy for docker on windows server from the right guide:
Using powershell in elevated mode:
Set environment variable to HTTP_PROXY environment variable
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://username:password#proxy:port/", [EnvironmentVariableTarget]::Machine)
May not need to specify credentials, if your proxy don't require it.
Restart docker
Restart-Service docker
Now it should run:
docker run hello-world
I am getting this error while running
>service docker start
docker: unrecognized service
>service docker.io start
docker.io: unrecognized service
I am struggling with docker in order to run it. I got Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? error. thereafter I tried several things but it did not work.
>docker pull pstothard/cgview
Using default tag: latest
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
>sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
>systemctl start docker.service
System has not been booted with systemd as init system (PID 1). Can't operate.
>docker images
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.40/images/json: dial unix /var/run/docker.sock: connect: permission denied
>snap stop docker
Interacting with snapd is not yet supported on Windows Subsystem for Linux.
This command has been left available for documentation purposes only.
I'm using ubuntu 18.04 app in windows system. what should I do?
Seems like WSL cannot connect to the docker daemon running through Docker for Windows, probably because it is not exposed or is not running.
WSL1
In case you are using WSL 1, you can expose the docker daemon through this option in Docker for Windows:
I recommend this article for a detailed guide.
I would highly recommend running docker within WSL 2 instead, since it provides faster boot times and allows docker to use CPU/RAM dynamically instead of you having to preallocate it.
WSL2
In case you are using WSL 2, you will have to enable the WSL 2 back-end for docker through Docker for Windows. The docker team has an extensive guide on this here.
After starting a command prompt, I normally start with login in to openshift with this command:
$ oc login https://api.starter-us-west-1.openshift.com
--token=
Works fine. Up till now I then connected to the docker registry of Openshift with the command:
$ docker login -u myOpenShiftName -p registry.starter-us-west-1.openshift.com (or :443)
Now I get this error (partly translated):
Warning: failed to get default registry endpoint from daemon (error
during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/info:
open //./pipe/docker_engine: The system cannot find the specified
file. In the default daemon configuration on Windows, the docker
client must be run elevated to connect. This error may also indicate
that the docker daemon is not running.). Using system default:
https://index.docker.io/v1/
Do I need a local docker running?
UPDATE/ANSWER: yes. On windows10 home start e.g. DockerQuickstartTerminal.
At another computer I had a similar error on Windows 10 pro with Docker. The service was started, but after I had started "Docker for Windows" the error disappeared.
My environment is Win10 home, virtual box + extension + docker toolbox.
The docker command cannot work without its local Docker daemon process running.
If you want to be able to work with OCI/Docker images and not need docker and the daemon, for some things you can use a tool like Skopeo.
https://github.com/containers/skopeo
There are also tools for building OCI container images which aren't dependent on docker.
I´ve installed CoreOs on BareMetal (dedicated 16GB, 4cores Atom). Docker is running and despite the fact that simple bash instructions run properly, when launching dockerui images downloaded form the hub I get the /var/run/docker.sock not found.
The sock file is present and docker daemon is running. When launching docker daemon in interactive shell I get no error from the daemon; but the error is coming from the client requesting running the image.
I bet the container you downloaded expects the docker socket to be mounted in as a volume, so that I can control it or issue docker commands.
Check that the docs you are following don't have docker run -v flag in them.
I have following error when I try to use docker on my Mac:
FATA[0000] Get http:///var/run/docker.sock/v1.17/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
It doesn't matter if I use sudo or not... It doesn't matter which docker command I use or if I use brew or boot2docker to install it...
What should I do to resolve this issue ?
The Docker daemon does not run natively on a Mac. Until it does, there will never be a socket for communicating with the daemon at /var/run/. You must therefore use TCP to communicate with the daemon because the daemon must be running on another machine (or a VM). Unix sockets only talk to processes running on the local machine. The unix socket method is very secure since it is only on the local machine and you must be root (or in the docker group) to talk with this socket.
Insecure (but easy) TCP Client-Server Communications
You can run the Docker Engine in a very insecure way by setting some environment variables on the client end and starting your daemon in an insecure way on the daemon end:
Client: substitute the machine's host IP and port
DOCKER_HOST=tcp://host:2375
DOCKER_TLS_VERIFY=0
Daemon
docker -d -H tcp://0.0.0.0:2375
(see also https://docs.docker.com/reference/commandline/cli/#daemon-socket-option)
Secure TCP Communications
Since you probably don't want random people talking to your docker daemon over the internet, you should run with TLS enabled. That's complicated, but all the steps are listed in the docs. boot2docker and kitematic on Macs hides this complexity by setting up the TLS certificates for you and setting the environment variables needed to find the daemon.