I just updated to macOS Monterey 12.4, and now Docker Desktop is not working at all. It was working fine before.
I've tried many things to troubleshoot this with no success:
Clicking any of the following troubleshooting buttons does nothing. It's unresponsive and shows no signs of success or failure:
Reinstalling docker with brew doesn't work:
brew uninstall --cask docker
brew install --cask docker
Uninstalling the app from Brew, and then installing the Apple Silicon .dmg from Docker's website didn't work.
Removing the app's files and then reinstalling via step #2 or #3 didn't work:
rm -rf ~/.docker
rm -rf ~/Library/Saved Application State/com.electron.docker-frontend.savedState
rm -rf ~/Library/Preferences/com.electron.docker-frontend.plist
rm -rf ~/Library/Preferences/com.docker.docker.plist
rm -rf ~/Library/Group\ Containers/group.com.docker/
rm -rf ~/Library/Cookies/com.docker.docker.binarycookies
rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/Library/Application\ Support/Docker\ Desktop/
Restarting my Mac doesn't work.
Restarting the Docker app doesn't work.
Killing all Docker processes with the Activity Monitor doesn't work.
Deleting the app from /Applications and then reinstalling it doesn't work.
Upon further inspection, I've been getting the following error:
~ docker ps
Error response from daemon: dial unix /Users/daniel/Library/Containers/com.docker.docker/Data/docker.raw.sock: connect: no such file or directory
This error has stayed the same no matter what I've tried. I'm completely baffled.
Environment
macOS Monterey 12.4
Mac mini (M1, 2020)
Chip: Apple M1
Memory: 16GB
Just get the official package from https://docs.docker.com/desktop/install/mac-install/
Related
I have installed docker using brew install homebrew/cask/docker and varying other ways yet when I enter docker --version to check CLI this error pops up
"-bash: /opt/homebrew/bin/docker: No such file or directory"
What should I be doing differently?
I have tried both installing through a .dmg file as well as through homebrew using cask.
You can remove the installation and run these commands:
rm -rf ~/Library/Group\ Containers/group.com.docker
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/.docker
Then try to install docker again and it should work. The .docker directory must have been owned by the root user.
I rented a dedicated macOS 64 but arm machine on AWS. I can’t have GUI access to this machine. How can I install Xcode on terminal and use xcodebuild? I tried xcinfo, it failed to download.
Steps to install Xcode
On your local machine:
Install cookies.txt Chrome extension
Login to Apple Developer site and get the url for downloading
Run cookies.txt extension and download cookies.txt file
On CI machine:
curl --cookie cookies.txt -O
xip -x Xcode.xip
sudo xcode-select -r
sudo xcode-select -p
sudo xcodebuild -license accept
sudo xcodebuild -runFirstLaunch
Or, use https://github.com/RobotsAndPencils/xcodes
I suddenly got the fatal error message from Docker yesterday. I really don't understand why as I shut down my machine properly. So I decided to uninstall docker and reinstall it. I went into the Applications folder in my Mac and I can't uninstall because it thinks the docker is open. So I need help with the following:
how do I uninstall docker?
how do I install it so it can start working again?
Attempts at a resolution:
Just tried the following command in my terminal:
docker kill $(docker ps -q)
I got the following response:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
"docker kill" requires at least 1 argument.
See 'docker kill --help'.
What do I do?
See the screen shot
This was getting me crazy.
You don't need to reinstall Docker to solve it. The workaround (at least in my case) is as simple as killing all Docker related processes and running Docker again:
$ pkill Docker
$ open -a /Applications/Docker.app
1- open Activity monitor and go to com.docker. process , from there you have to kill it to proceed further.
2- uninstall from mac is standard procedure.
In my case I was not able to use the Option of Rest and Diagnose too. UI was completely hung
Here's how I solved it.
Killed the docker process $ pkill Docker
Moved the docker application to bin
Manually deleted all the below files
sudo rm -rf /usr/local/lib/Docker
sudo rm -rf /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo rm -rf /Library/LaunchDaemons/com.docker.vmnetd.plist
rm -rf ~/.docker
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/Library/Application Support/Docker Desktop
rm -rf ~/Library/Preferences/com.docker.docker.plist
rm -rf ~/Library/Saved Application State/com.electron.docker-frontend.savedState
rm -rf ~/Library/Group Containers/group.com.docker
rm -rf ~/Library/Logs/Docker Desktop
rm -rf ~/Library/Preferences/com.electron.docker-frontend.plist
rm -rf ~/Library/Cookies/com.docker.docker.binarycookies
Restarted the laptop
Installed the latest version again which worked fine
Ok, I was able to fix this problem. You can do this with ANY application (just change the name), that you can't remove from the applications folder.
It will remove the entire application in its entirety. The existence of the application is wiped clean.
Please do the following commands in this order
ps aux | grep docker
When you run this command you get a big display. You are only interested in the following thing in the his screen grab
2 Then do a sudo kill command that includes the number in the red box from the ps aux|grep command as shown this code example in step 1.
sudo kill -9 108
Finally go to sudo remove command specifying the specific folder and application you want to remove.
sudo rm -rf /Applications/Docker.app/
Restart your machine.
Install version of docker. If the error occurred when updating to a new version of docker (such as in my case). You can download an older version of docker from here (the older version numbers are listed in the far left). I chose 3.3.0 (released 04/21 installed 6/11/21
Note:
If you have a problem installing an older version of docker and you encounter a problem
Run the following command and you will see a .json display
vi ~/Library/"Group Containers"/group.com.docker/settings.json
Scroll down to settings and modify the version down. For 3.3.0 I went down to setting version 7.
Restart docker and when it opens check images and you can see your containers
It worked for me when I opened the terminal and then ran this:
killall Docker && cd /Applications;open -a Docker;cd ~
I found it here: https://www.lewuathe.com/how-to-deal-with-failed-to-ping-backend-api-in-docker.html
I'm facing this error for docker version 3.6.0. then reinstall docker version 4.1.1 and it's working fine.
Today I upgraded docker from 18.06 to 18.09 in a debian stretch host. After the upgrade all our images and container were "gone", i.e. docker <command> won't show them anymore but the data in /var/lib/docker wasn't gone. dockerd -D unveiled:
Cannot load container XXX because it was created with another graph driver
So the first thing I did was downgrade docker to the last version to check if that fixes it. It worked kind of. The systemd unit file which worked before failed to start the docker service. Turns out I have to explicitly pass -s devicemapper to dockerd now and I don't know why because apparently the upgrade to 18.09 did put /var/lib/docker/overlay2 which I simply had to remove to make 18.06 startup as before.
So after I confirmed that this is fixed with the last docker-version, I upgraded again to 18.09 and tried if passing -s devicemapper explicitly does the trick here. But with 18.09 the daemon won't even start at all and complains:
Failed to GetDriver graph driver=devicemapper error="graphdriver plugins are only supported with experimental mode" home-dir=/var/lib/docker
I can't find anything about devicemapper being deprecated or something like that, so what were I supposed to do before the upgrade? Is there any general advice/best practice to avoid issues like that?
In case it is of help to anyone. I had to nuke the 18.09 release that was pulled in through the update channel for my mint installation:
sudo apt-get autoremove docker-ce
sudo rm -rf /etc/docker
sudo rm -rf /var/lib/docker
sudo apt-get autoremove --purge docker-ce
Then reinstall before getting a working 18.09 docker install back:
sudo apt-get install docker-ce
This moved my storage driver to Storage Driver: overlay2 when it was previously devicemapper, which seems to be the root of the issue.
There's no doubt a solution to this via /etc/docker/daemon.json settings, but I haven't got time to figure out what that is unfortunately.
Clearly, you'll lose all your local Docker images if you nuke /var/lib/docker, so make sure you want to do that before cut-n-pasting.
And yes, the original question should probably have been posted to SU and not SO...
I am biginner in block chain development. I tried to hyperledger composer in multiple host. I successfully running ./startfabric.sh.
Then I tried to run ./createpeerAdmincard.sh
But I got an error message that no valid response from any peer. I changed many time composer vertion 0.16 to 0.19.x. And I tried to delete .composer file in home directory. But my problem is not solved. Please give a solution as possible.
Os is : Ubuntu 16.04
Hyperledger composer is:1.0.4
Thanks
Before anything, I would run these commands in the directory which has ./startFabric.sh to uninstall previous versions of your CLI / remove all cards or credentials you may have generated up to this point.
$ npm uninstall -g composer-rest-server
$ rm -rf ~/.composer
$ rm *.card
$ rm -rf credentials/
(optional - kill docker containers)
$ docker kill $(docker ps -q)
$ docker rm $(docker ps -aq)
$ docker rmi $(docker images -q)
now run
./downloadFabric.sh
and then after
./startFabric.sh
Now, install composer and composer-rest-server (version 19.5) ** this is very important.
npm install -g composer-cli#0.19.5
and then
npm install -g composer-rest-server#0.19.5
and then, after all that, try and use ./createPeerAdminCard.sh
I find this tutorial pretty useful to get up and running with Composer -> https://github.com/IBM/BlockchainNetwork-CompositeJourney#1-starting-hyperledger-fabric