Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boot2Docker for OS X fails to start

I am new to docker and I'm attempting to run boot2docker on my work computer. I'm logged in to the computer running OS X version 10.10.1 (Yosemite) with a user account that mounts the home directory from the office network.

I installed Docker v1.4.1 from https://github.com/boot2docker/osx-installer/releases and VirtualBox 4.3.20 for OS X hosts from https://www.virtualbox.org/wiki/Downloads

I followed the instructions on docker.com mac installation but I didn't get the supposed to be results.

The docker terminal gives this error:

bash-3.2$ /usr/local/bin/boot2docker init 
Virtual machine boot2docker-vm already exists
bash-3.2$ /usr/local/bin/boot2docker up 
error in run: Failed to start machine "boot2docker-vm" (run again with -v for details)
bash-3.2$ $(/usr/local/bin/boot2docker shellinit)
error in run: VM "boot2docker-vm" is not running.
bash-3.2$ docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
FATA[0000] Get http:///var/run/docker.sock/v1.16/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? 

Starting boot2docker-vm on VirtualBox returns the following error:

Failed to open a session for the virtual machine boot2docker-vm.

NamedPipe#0 failed to bind to local socket
/Network/Servers/servername/Volumes/cal/Users/username/.boot2docker/boot2docker-vm.sock (VERR_NOT_SUPPORTED)
like image 218
xanderlopez Avatar asked Jan 07 '15 09:01

xanderlopez


People also ask

What is boot2docker?

Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers. It runs completely from RAM, is a ~45MB download and boots quickly. Boot2Docker is designed and tuned for development. Using it for any kind of production workloads is highly discouraged.

How much space does boot2docker take to install?

It runs completely from RAM, is a ~45MB download and boots quickly. Boot2Docker is designed and tuned for development. Using it for any kind of production workloads is highly discouraged. Installation should be performed via Docker Toolbox which installs Docker Machine, the Boot2Docker VM, and other necessary tools.

How do I install boot2docker on VirtualBox?

Installation should be performed via Docker Toolbox which installs Docker Machine, the Boot2Docker VM, and other necessary tools. Boot2Docker is used via Docker Machine (installed as part of Docker Toolbox) which leverages VirtualBox's VBoxManage to initialise, start, stop and delete the VM right from the command line.


3 Answers

Try the following: Some people have reported problems starting suspended boot2docker VM's the steps below have normally fixed the issue for me.

boot2docker delete
boot2docker download
boot2docker init
boot2docker up

If this does not work Open the Virtual box and see the status of the boot2docker vm. If it says saved, then start the VM from the UI and then send it the shutdown signal from the menu. You should then be able to start and stop the VM from boot2docker subsequently.

like image 102
Usman Ismail Avatar answered Oct 20 '22 17:10

Usman Ismail


I had the same problem and this series of commands worked for me:

boot2docker up
$(boot2docker shellinit)

After that, I was able to run commands like docker ps and docker images without getting an error, so I was all set.

like image 8
Mark Madej Avatar answered Oct 20 '22 17:10

Mark Madej


I believe this is similar to the problem which I got earlier. It seems like, it is mandatory to have the localhost assigned to 127.0.0.1 in our hosts file(location is /etc/hosts). The following line should be there in /etc/hosts. Hope it helps!! boot2docker shellinit command ended up in error "Error requesting socket: exit status 255"

127.0.0.1 localhost

P.S: Edited the post because links might be gone

like image 1
phoenix Avatar answered Oct 20 '22 15:10

phoenix