Docker failed to initialize Docker Desktop is shutting down - docker

This question was already asked a lot, but I didn't found a solution which is working for me.
I downloaded Docker Desktop with his guide for my windows 10 machine. After a successful installation the application does not start.
Following this solution didn't work. I deleted settings.json and restarted everything without success. Even reinstalling did not work. Any one has an other idea?
Edit:Reinstalling an older version (3.6.0 in my case) fixed the issue, but there has to be some other way...

Stop all processes with Docker and remove all content from the directory
C:\Users\<User>\AppData\Roaming\Docker
After that start Docker Desktop.

Related

Docker desktop automatically stopped on Windows 10

Recently I faced a problem that when I open docker desktop it's automatically stopped after a few seconds. I try to solve it in several ways like reinstalling the docker desktop and also trying some methods that are available on the internet as solutions. But these do not work for me.
Is anyone can help me, please.
I have had lots of problems with installing docker on windows .
make sue you are following docker's documentation step by step.
Most of the times the problem is related to wsl2 , hyper-v or cpu virtualization. check this parameters
Docker in windows

Docker Failed to Initialize on Windows 10

I have an issue with running the Docker Desktop on my Windows 10 PC. After trying to run it I got an error:
Docker failed to initialize - Docker Desktop is shutting down
I already tried reinstalling (as admin), restarting PC, restarting docker services, removing content from .../AppData/Local/Docker and .../AppData/Roaming/Docker folders, but still receiving the same error message.
Does anyone have an idea how can I fix it?
Thank you a lot!
Simply local Appdata on your windows box, go to Roaming->Docker and delete the settings.json file. Restart docker and you will be fine.
Appdata can be located at this path: C:\Users\LifeIsGood\AppData\Roaming\Docker
NB. LifeisGood is my username
Downgrade to the older version solved my issue
You can try uninstalling docker and deleting
/Users/AppData/Local/Docker
/Users/AppData/Roaming/Docker
C:/Program Files/Docker
C:/ProgramData/Docker
Reinstalling Docker
However, what worked for me ultimately was deleting .docker in /Users folder and restarting docker.
I get that a lot on my laptop. I restart the "Hyper-V Host Compute Service" in Services. When that has restarted, I can start Docker Desktop.
I haven't found a permanent fix.
I had the same issue while starting the "Linux container" but windows container was working fine.
After trying All the possible methods to make docker desktop work, In case that is not worked then try this one. This one worked for me.
Please make sure to use older version of docker desktop ( mine is 4.4)
In docker desktop,
Go to settings --> General --> Use the WSL 2 based engine
Where If that check box turned On, Just Turn that off.

Docker desktop / daemon won't start on new M1

When I try to startup Docker Desktop on a new M1Max, it gets a fatal error that the "Docker daemon failed to start". The last log item for the daemon is just a debug message "Calling HEAD /_ping".
I'd like to try to start the daemon manually on my Mac to see if there are better error details, but all of the docs for that mention using dockerd which isn't available on the Mac install.
Background: I just switched from an older MBP to a new M1Max. I replaced my Docker Desktop with the new version for Apple Silicon and everything started up fine. However, some of my containers were having issues on the new arch. While debugging those issues, I restarted Docker Desktop and began experiencing this issue. I've tried restarting my mac, but it just gives me the same error again. I've tried downgrading Docker Desktop to the last handful of older versions and still get the same message. The strange thing is that my log file for dockerd hasn't been touched since before I restarted Docker Desktop when I first encountered the error. It's like the daemon isn't even trying to start anymore. Any help would be greatly appreciated.
UPDATE: I just reset my Mac back to my starting point (after using the migration assistant to port my old MBP to the new). When I first install Docker Desktop for Apple Silicon, it starts up normally and everything runs fine. If I check on the dockerd logs, I can see it being written to. However, as soon as I restart Docker Desktop, I get the error mentioned above and dockerd stops writing to logs. Then, every time I try to start Docker Desktop, it errors with the message above.
do the following
clean uninstall docker either using brew/appcleaner
Manually install 4.5.0 M1 - https://docs.docker.com/desktop/mac/release-notes/
that is after manually installing ensure to uncheck automatic software update from setting
!! It worked for me !!

Cannot create container for service xxx: open /var/lib/docker/overlay2/969rf5...fdf-init/merged/etc/resolv.conf: Operation not permitted

while deploying docker images on the production server using docker-compose, I got the following error.
Cannot create container for service xxx: open /var/lib/docker/overlay2/969rf5...fdf-init/merged/etc/resolv.conf: Operation not permitted
What I tried:
Changed permissions ( So much so that gave 777 for all the directories involved)
Upgraded kernel (Saw somewhere that it could be kernel issue)
Removed ACL using setfacl -Rb /var/lib/docker
Added the "graph: /var/lib/docker" line in daemon.json
Restarted docker service couple of times.
Tried running the images individually and not using docker-compose.
Tried running with sudo
Set the --storage-opt overlay2.override_kernel_check=1 (Since it is rhel and kernel version supported for docker overlay2 is >4.0, so was suggested to override it.)
I failed everytime!
Have no idea what the issue is or what it could be. Every time I run the docker-compose file, it creates a new directory in /var/lib/docker/overlay2 with old permissions even though I change the permissions for all the other directories in it. At this point I'm not even sure if it is permissions issue or not.
Any help would be appreciated! Thank you!
Finally after trying everything on the internet and nothing working out, the issue was resolved. It was due to the Antivirus that was installed on the server. Had it removed by the client and docker/docker-compose started working absolutely fine.
To give a little more information on the antivirus, it was some FIM antivirus that was installed on a rhel 3.10-xxx which was blocking docker. It was an older version and thank goodness newer versions are compatible with docker. So that's a wrap, thank you all!

Docker is always show "Docker Engine starting..."

Hello I got new existing projects and using docker.
The problem is my docker desktop app always in Docker Engine starting..., but in my icon it's already show Docker Desktop is running.
running on windows 10🙏
Just close docker desktop app and then open it up again, it will run normally again
Had the same issue running Docker Desktop 3.2.2.
Fixed by downloading Docker Desktop 3.3.0 (https://docs.docker.com/docker-for-windows/release-notes/)
In some cases the following method works:
open cmd as admin
enter net stop winnat
start or restart docker desktop
enter net start winnat
Here is my solution.
Run the following two lines of commands inside PowerShell.
First Exit docker hub desktop, then run these commands in PowerShell:
wsl --unregister docker-desktop
wsl --unregister docker-desktop-data
Note: It should be noted that this removes all docker containers and data. (WLS: Unregisters the distribution and deletes the root filesystem.)
Suddennly i opened my laptop and started Docker, it was displaying only "Docker desktop starting" and stuck here for long time. I tried to delete settings.json(auto created on starting docker again) at \AppData\Roaming\Docker
but nothing worked.
So, i simply restarted my laptop undoing all changes, and this time after few mins Docker desktop started successfully.
When I check, I was using the latest version so downgrade the Desktop version 4 to version 3.
https://docs.docker.com/desktop/previous-versions/3.x-windows/
summary - Try with a different version other than the latest one.
Hope this helps !!!
version 4.16.2 must be updated immediately to 4.16.3
open update to latest window and read the update cause:
Fixed Docker Desktop failing to start...
It couldn't be updated, so uninstall and install it again.
Rebooting fixed the issue for me.

Resources