Docker boot2docker fails to be started after Docker is installed on Mac. dockerboot2docker
After installing Docker on Mac, you must start boot2docker to load VM before using the docker command. However, an error occurs when I start boot2docker after installing boot2docker:
Waiting for VM and Docker daemon to start ................................ ........................................ ..... oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooostarted. trying to get Docker socket one more timeError requesting socket: exit status 2
You cannot start the test.
Later, I found a round on overseas websites and found that when boot2docker was started, I had to ensure that there was only one localhost in/etc/hosts on the Mac host, pointing to 127.0.0.1.
Sudo vim/etc/hosts
After modifying the hosts file, run the following command to delete the vm.
Boot2docker delete
Then run again
Boot2docker init
OK.