[fixed] Docker desktop on Mac OS says "Docker Engine stopped"
I was developing a new feature in KartBusiness
, but when I tried to launch the local development environment with Laravel Sail, Sail said docker is not running
.
I opened the Docker desktop and there is a message “Docker Engine stopped”.
I checked the notifications inside Docker Desktop, and there are too many notifications telling me “Failed to fetch extensions”.
My first approach to fix this problem is to terminate Docker Desktop and Docker via Activity Monitor, then start Docker Desktop again and check if it works. After I did that It worked.
Restart Docker Desktop step by step 🔗
- Go to Finder > Applications > Utilities > Activity Monitor.app
- Find Docker or Docker Desktop and Force Kill the app.
- Open Docker Desktop from the applications menu.
Here is a video of me fixing this problem when I faced it.
Start from scratch 🔗
If the previous way does not fix the problem, let’s try this way.
We’ll force kill Docker from the Activity Monitor, then remove Docker’s files and settings. This method has worked for some users as it resets Docker’s settings and removes all your containers.
Here are the steps:
- Go to Finder > Applications > Utilities > Activity Monitor.app
- Find Docker or Docker Desktop and Force Kill the app.
- Run the following command in Terminal:
sudo rm -rf ~/Library/Containers/com.docker.*
- Open the settings file in the terminal:
sudo nano ~/Library/Group\ Containers/group.com.docker/settings.json
- Find “filesharingDirectories” and remove all entries inside this key. Save and close the file.
notice: I chose to use nano
as it is noob-friendly but I personally prefer nvim
(a modern fork of vim
).
Finally, go to the Application folder, find Docker Desktop and run it.
If it does not work, run Docker from the package contents of the Docker application. This method has also worked for some users.
Here are the steps:
- Right-click on Docker in Applications folder
- Select Show Package Contents
- Click through Contents -> MacOS -> double click on Docker exec file
reinstall Docker 🔗
If the problem persists, uninstall Docker, remove all Docker-related files and directories, and then reinstall Docker.
Here are the steps:
- Uninstall Docker
- Run the following commands in Terminal:
rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop
- Reinstall Docker using Homebrew:
brew install --cask docker
Still doesn’t work 🔗
Run Docker from Terminal Some users have reported that running Docker from Terminal while Docker Desktop is open has resolved their issue.
Here are the steps:
- Run the following command in Terminal:
/Applications/Docker.app/Contents/MacOS/Docker
If the problem persists, run /Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload
to report the problem to Docker authors (developer team).
Send this diagnostic report to your IT or dev friend to help you identify the problem, or post an issue in Docker github.