I want to install docker using command line not using docker for mac. I have downloaded the individual binary for Mac from this link.
docker ce binaries
I am able to run docker command but if I run docker ps then it shows
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
I tried another way to downloading docker using brew as below
brew cask install docker
But using brew it only download the desktop setup of docker and I have to start it manually.
So I am looking for a solution in which I can install and run docker through command without involving any UI.
Thanks
The error above means that the docker service is not running so you have to run it first. Then enable it to start on boot - to avoid the need to start it each time you login to your macOS - at the end you should be able to use docker cli without issues
Related
Hi, I have this problem, trying to running Docker in Ubuntu 20.04 in windows 11 using the WSL, I installed it using the official documentation in https://docs.docker.com/engine/install/linux-postinstall/, I tried with some commands like:
sudo service docker start | restart
Show me OK but this didn't work when I tried to execute again the run hello-world command.
Can you help me please?
You should install Docker for Windows and manage it from there, rather than a service within WSL. Then in the preferences, you can link it to WSL2, where it'll install the Docker CLI.
I have Microsoft Windows 10 Pro version 10.0.19041 N/A Build 19041 and I follow steps here https://learn.microsoft.com/en-us/windows/wsl/install-win10 to install Ubuntu 20.04 LTS on it using WLS2 , I'm doing so to install docker by following steps here https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
but when I try to run sudo docker run hello-world it gives me this error docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'. I know that a similar question asked here Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? ,and I try to run systemctl daemon-reload and systemctl start docker but al the solutions does not worked for me it gives me another errors like System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down and Also try to fix it but I can't, So I need your help.
Note : I have already install Docker in windows and It works fine.
I have been solving this problem by following these steps
Purge the Grub package Linux command according this issue https://github.com/microsoft/WSL/issues/4903
Stop Docker Desktop from Windows
Run sudo dockerd which is the daemon service for Docker containers
https://i.stack.imgur.com/qgbwE.png
Open new Ubuntu shell session
Run docker run hello-world
and it's work fine with me https://i.stack.imgur.com/6TJ3u.png
I've installed Stable Docker Desktop for WINDOWS 10. I tried running:
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.
So it appears that it can connect to Docker daemon. However when I run my own command:
C:\Users\cortex>bash
DESKTOP-2GHN95P:/tmp/docker-desktop-root/mnt/host/c/Users/cortex/# cortex deploy
I get following error:
error: unable to connect to the Docker daemon
please confirm Docker is running, or if Docker is not installed, install it by following the instructions for your operating system: https://docs.docker.com/install
I'm new to Docker and I can't figure out this problem. Anyone has any ideas?
Looks like you're trying to run cortex from a WSL, which is trying to take action on the docker engine in the host OS. If you have WSL 2, you can enable the WSL 2 integration for Docker desktop in the settings. If that's not an option, you can always install docker on your WSL instead,
I installed docker with the instructions here, downloading from docker-hub
https://docs.docker.com/docker-for-mac/install/
But when I run docker-compose I get this error
pyenv: docker-compose: command not found
The `docker-compose' command exists in these Python versions:
3.6.5/envs/myenv
Also, docker-compose is available under /Users
which docker-compose
/Users/<username>/.pyenv/shims/docker-compose
In this link says, docker-compose for mac need not be installed explicitly as it is part of docker for desktop mac.
https://docs.docker.com/compose/install/
Is something wrong with my installation?
I ran into the same issue on macOS today. Turned out that you need to run the installed app once, it does some additional downloading and setup. That setup includes setting up your path variables.
docker-compose is a utility that is now a parameter in mac docker
so instead of docker-compose up, its now docker compose up
if you install docker from official website then docker-compose will come along with that for mac so need to either upgrade and documentation is present there.
It is possible to install Microsoft CNTK on a macbook? I have OS X El Capitan. The official Microsoft documentation at https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-your-machine doesn't provide any information for mac users.
Thank you
As of June 2017, you can only run CNTK on OSX using Docker (which will run a Linux container)
Documentation from Microsoft is available here: https://learn.microsoft.com/en-us/cognitive-toolkit/CNTK-Docker-Containers
If you want to run the CPU version of CNTK (as opposed to a GPU enabled) you'll need to pull a particular version of the docker container. See: https://hub.docker.com/r/microsoft/cntk/
I recommend using the following for CPU CNTK:
docker pull microsoft/cntk:2.0-cpu-python3.5
Once you've pulled the container above, you can use Jupyter Notebooks to look at tutorials etc:
First, run the container:
docker run -d -p 8888:8888 --name cntk-jupyter-notebooks -t microsoft/cntk:2.0-cpu-python3.5
Then run this command:
docker exec -it cntk-jupyter-notebooks bash -c "source /cntk/activate-cntk && jupyter-notebook --no-browser --port=8888 --ip=0.0.0.0 --notebook-dir=/cntk/Tutorials --allow-root"
You'll want to access the shell to run CNTK commands. You can attach a bash shell using docker.
Get your container id
docker ps
Then attach a shell
docker exec -it <container_id> bash
While it might not be supported on Mac directly, you can always use a virtual machine to get around.
You can setup docker in your local environment.
https://docs.docker.com/docker-for-mac/
Follow its documentations on how to install on Docker
https://github.com/Microsoft/CNTK/wiki/CNTK-Docker-Containers
We currently support both Linux and Windows. Mac support is on our ToDo or would be interested in community contribution.
I'm currently building CNTK on a linux machine without root access, installing every dependency with linuxbrew (a fork of homebrew). So I think is possible to build on MacOS natively. You can try building it from source with CNTK linux manual to build from source. Let me know if you have any issue.