Error on docker starting exit code -1

Hello, I’m new here and I’ve been reading “The missing guide”, but I haven’t been able to launch docker since I get this error:

I’ve tried many ‘solutions’ I’ve found online but none seem to work. I’m on Windows 11 Pro.

1 Like

Hmm…

How did you install Docker? Have you verified that Docker is working correctly on its own?

I used the Docker Desktop Installer downloaded from Docker’s website. I can’t check if it is working correctly on its own because as soon as I open Docker I get that error.

1 Like

Does your machine meet the requirements for Docker?

For instance, is VXT-D or the AMD equivalent enabled in your UEFI to allow for Virtual Machines to work properly?

Yes, virtualization is enabled and my specs should be enough for Docker.
Here are my specs:
specs

And 32gb RAM.

1 Like

Have you enabled Hyper-V and other Windows virtualization services / platform support in Add/Remove Windows features?

Yes, maybe I’m missing one?

1 Like

Please try adding Windows Hypervisor Platform as well and rebooting.

1 Like

Done. But Docker still not starting.

1 Like

This may be a silly question, but did you set up WSL and add a Ubuntu Linux environment?
I believe that’s a prerequisite for Docker on Windows.

1 Like

Not silly at all, and no, not required.

The Docker for Windows setup program will handle everything for you.

It should really be as simple as running it and waiting for the install process to complete. Your obligation to get Docker working really begins and ends at ensuring your hardware supports it, it’s enabled in UEFI, and you’ve got the few Windows features required installed.

Hey Johnny, I don’t really now, I checked the WSL box in the docker setup.

1 Like

I’ve checked everything you have told me here and tried every other possible solution I’ve found on the internet, still not working :frowning:

1 Like
Here are my notes on the setup steps I followed for WSL:
--------------------
Install Windows Subsystem for Linux 2
	a. Open PowerShell CLI as Administrator
	b. On command line run this to install the Ubuntu Linux virtual machine environment:
		a. >wsl --install
	c. Follow installation instructions
	d. Check installed ok by entering command "wsl --list --all" and expect this output:
			Windows Subsystem for Linux Distributions:
			Ubuntu (Default)
	e. If Ubuntu (Default) is not listed, run:
		i. >wsl --install -d Ubuntu
	f. Increase wsl swap file size
		a. Go to the user account home directory (C:\Users\<username>)
		b. Create a text file named ".wslconfig"
		c. Enter line with required swap file size, e.g.: swap=32GB
		d. Save and close file
		e. Restart computer
--------------------

(BTW I haven’t figured out why the fonts in things I post are all messed up so just ignore that weirdness!)

1 Like

Hey Johnny, I was searching online for more solutions and someone mentioned this command in PowerShell: wsl -l -v
The result I got was this:
aaaa
I will also tried what you just suggested.

2 Likes

So… I tried at least 10 more “solutions”, none worked, until I saw someone suggest deleting .wslconfig, I did, now docker is working.

2 Likes

What was in your .wlsconfig file?

3 Likes

I just noticed I made a mistake. I did not backup a copy of .wslconfig :man_facepalming:
I tried to make one using an example from the Microsoft forum but that brings back the exit code -1 again.

1 Like

If you aren’t modifying any settings, you don’t need one.

What settings were you looking to modify in your .wslconfig?

1 Like

I wanted to assign as much resources as possible.

1 Like