Docker for windows doesn't work. What could I do with it? - docker

Yeah, I know, there are some questions similar to that, but none of them helped me. My docker for windows has once stopped working. Now I can't even uninstall it, because in the applications it doesn't appear, I cannot install it, the installation stucks always on the same process, I tried to delete all the files and then install again, tried to stop all the proccesses related to docker, I tried everything. I cannot even uninstall, cannot reinstall, cannot run... cannot do anything with it... help!

I finally solved that. I deleted manually all the directories related to docker (ProgramFiles, ProgramData, [user root directory], Appdata/Roaming etc.) and this way the installer finally finished. There was another problem, that WSL2 engine tried to start, but couldn't. WSL was enabled, the engine starting process was running for ca. 1 hour... but nothing happend and couldn't even change the engine. So I reinstalled once again, and didn't install the WSL frame. It started automatically with Hyper-V and now it works fine.

Related

Docker failed to initialize Docker Desktop is shutting down

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.

Docker Daemon not running on windows 11

I am a beginner into Docker stuff, I am on windows 11 and whenever I try to open docker desktop it doesn't open.
Always this error message shows up, also whenever I try to run docker ps or docker images
or anything related to docker it always shows this error
can anyone help
I have turned on hyper-v, wsl etc but nothing seems to work
I had the same issue, tried to get assistance from docker support and did lota google but nothing worked.
I had a gut feeling that the issue was not within the Docker Desktop as i have tried all the options including deleting docker appdata etc. sov, i started investigating WSL and noticed the distros docker-desktop-data, docker-desktop was in stopped & uninstalling state. These states never changed and appears even after uninstalling Docker desktop and windows reboot.
PowerShell (admin)
wsl -l -v
I removed those distros after uninstalling docker desktop completely (including deleting docker folders from appdata manually)
PowerShell (admin)
wsl --unregister "DistributionName"
Replacing "DistributionName" with the name of your targeted distribution will unregister that distribution from WSL so it can be reinstalled or cleaned up. Caution: Once unregistered, all data, settings, and software associated with that distribution will be permanently lost. Reinstalling from the store will install a clean copy of the distribution. For example, wsl --unregister "DistributionName" would remove "DistributionName" from the distributions available in WSL. Running wsl --list will reveal that it is no longer listed.
PowerShell (admin)
wsl --unregister docker-desktop-data
wsl --unregister docker-desktop
Finally, reinstalled Docker desktop and its associated applications.
It started working perfectly!
That is followed by docker/for-win issue 12413, and this question (which suggests a fresh installation of Windows 11 itself!)
Only workaround so far (to avoid reinstalling W11):
I tried reinstalling a couple times and different versions and nothing worked, the UI would just never show up.
The only solution really was to delete C:\Users\<username>\AppData\Roaming\Docker and C:\Users\<username>\AppData\Roaming\Docker Desktop.
I was facing similar issue with Windows 10 and Docker Desktop 4.16.3 (96739)
I had disabled WSL2 based engine.
Just executed below command using Power shell( admin):
wsl --unregister docker-desktop-data
wsl --unregister docker-desktop
And my issue got solved like snap of finger.
Thanks
After trying all the solutions listed here and nothing worked for me, i simply reinstalled wls2 from windows app store. and everything worked fine for me.

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.

Rubymine for remote SDK. Gems downloading and suddenly stop

I'm having this issue since yesterday and I am not sure what could be the problem. I have a Rails application that I want to run against a remote SDK installed on my VirtualBox (Ubuntu); yesterday I was able to set it up on another VM I have and when I went to Settings in Rubymine and added the SSH credentials, it took some time but finally a lot of gems were downloaded and I was able to run the project directly from Rubymine environment, trying to prepare everything for debug.
I had to change my VirtualBox and now when I connect to it via SSH it starts "Collecting files..." for a while and then "Downloading..." the gems... it looks like it restarts for a couple of times and then at some point, after a while and without any further notice, it stops.
If it helps, my host is Windows 7, my guest is Ubuntu 14.04; my RVM is 1.9.3-p392.
Any ideas? I'm surprised because this worked like a charm yesterday and today is not. Thank you in advance for any help.
What version is your Rubymine? I had issue back with version 6.x with remote rubies freezing the system. Also are you using a Vagrant box? I have seen some of the Vagrant boxes have issues as well. I would log in to the Ubuntu Guest via command line/SSH and see if you still have issues downloading gems.

Vagrant VM not saving any changes; creates new VM upon every `halt/suspend + up` (Windows Vagrant, VirtualBox, RailsDevBox)

I am trying to use Virtual Box + Vagrant + Rails Dev Box on a Windows machine. I am able to run vagrant up and vagrant ssh to get into the virtual machine but none of the changes that I make are being saved, such as installing rails. Every time I halt Vagrant and start again, it's as if I loaded it for the first time. The process goes through all the steps that make the first vagrant up.
I have noticed, however, is that the one change I made to the Vagrantfile (synced folders location) is persisting. Also, if I use vagrant reload, the changes seem to persist. So it looks like the problem only happens if I use vagrant halt or vagrant suspend followed by vagrant up. But I wasn't under the impression that vagrant halt (and especially not vagrant suspend) is supposed to destroy a VM.
And when I open VirtualBox Manager I can see a bunch of instances of rails-dev-box VM's that have been created.
I found an issue that looks like this in the Vagrant Github issues site but honestly the discussion is totally over my head and I wasn't able to understand the resolution even though that thread is closed.
If anyone knows what is causing and could explain in "newbie" terms or, if my problem is too opaque, could walk me through the next steps to debug, I would really appreciate it!
EDIT
After writing this out and thinking about it more, I realized the problem is not actually that "changes aren't being saved." They're being saved...but I'm just being taken to a brand new VM any time I run vagrant up.
Have you tried vagrant resume instead of vagrant up?
I have been having this same issue, and have a couple possible solutions.
The file Vagrant uses to keep track of the default VM is .vagrant/machines/default/virtualbox/id. (The contents of that file will be the UUID of the VM, which can be found in the VirtualBox.xml file.) If there is anything wrong with the VM referenced there, then Vagrant apparently just deletes the file and tells you to start over.
One GitHub issue reported this same problem, in that case the VM was in an "invalid state" in VirtualBox. The problem was solved by deleting a corrupted save state.
That may be the issue that you are having, though it was not mine. If and when I figure out why I am having this issue, I will update this answer.
Edit: I booted up my vagrant VM manually from VirtualBox Manager (though I was not able to use it for development, because the shared folder wasn't set up by Vagrant). I didn't see any major problems, so I shut it back down. Next I replaced the id file manually, as described above. I did vagrant up again and it worked. Note that in order to keep it from being re-provisioned, you also need to re-create the action_provision file in that same folder. The contents of mine are: 1.5:<uuid>, where <uuid> is the machine's UUID. (I am not sure what the 1.5 means..) I have since done both vagrant suspend and vagrant halt (each followed by vagrant up) multiple times, and haven't had any further problems. I still don't know what caused this issue. If I have any other problems, or find out why this happened, I will again report back here.
Edit 2: I have finally figured out the problem. First, to help track things down, I did VAGRANT_LOG=debug vagrant status. This produced a lot of output, but as I dug through it, I found one line in particular of interest: VBoxManage.exe: error: could not find a registered machine with uuid <uuid>. I then did some manual debugging, and found that VBoxManage.exe list vms returned blank. It turns out that VirtualBox had lost track of my .VirtualBox folder, because I was doing all of this in Cygwin. Some more debugging, and I found that the environment variable that VirtualBox was looking for was HOME. I set that to my Windows home directory (/cygdrive/c/Users/<me>) in my .bashrc, and it fixed the problem, this time more permanently.
TL;DR:
Open the VirtualBox GUI and make sure there are no errors related to your VM.
If you are in Cygwin, ensure that HOME is set to the right value.
Otherwise, prepend VAGRANT_LOG=debug to any Vagrant command to debug further.
First, get the state of the VM to where you want it i.e. all things installed and configured.
While the VM is running, executing vagrant global-status gets the 'id' of the box and then do a vagrant package {id} packages it into a local package.box file.
vagrant box add package.box --name {whatever-name} - should get your box added to the list of available ones.
Then you can either create a new Vagrantfile or modify the existing one to load the vm with this new name.
Hope this helps.

Resources