Skip to content

Instantly share code, notes, and snippets.

@garthk
Created June 21, 2015 23:51
Show Gist options
  • Select an option

  • Save garthk/d5a17007c277aa5c76de to your computer and use it in GitHub Desktop.

Select an option

Save garthk/d5a17007c277aa5c76de to your computer and use it in GitHub Desktop.
boot2docker 1.7.0 cert fix
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1
@adamkdean

Copy link
Copy Markdown

Instead of this, I opted for boot2docker delete, boot2docker init, boot2docker up.

@crramirez

Copy link
Copy Markdown

Excellent article!! Happened the same to me about the WARNING. For me boot2docker delete is a pain option.

@oprearocks

Copy link
Copy Markdown

Straight to the point! Guys, if anyone is having issues with their containers not connecting to the internet(apt-get update fails), make sure you do a clean reboot of your computer.

@Bill

Bill commented Jun 24, 2015

Copy link
Copy Markdown

Yes!

@smentek

smentek commented Jun 24, 2015

Copy link
Copy Markdown

Thanks. works after forced power off at first time

@dbartow

dbartow commented Jun 24, 2015

Copy link
Copy Markdown

Thanks! Awesome quick fix.

ghost commented Jun 25, 2015

Copy link
Copy Markdown

thanks

@MikeMitterer

Copy link
Copy Markdown

Top! Thanks!

@y16ra

y16ra commented Jun 26, 2015

Copy link
Copy Markdown

In my case

$ boot2docker ssh
$ sudo /etc/init.d/docker stop
$ sudo /etc/init.d/docker start
Need TLS certs for boot2docker,127.0.0.1,10.0.2.15,192.168.59.103
-------------------
Generate server cert
/usr/local/bin/generate_cert --host=boot2docker,127.0.0.1,10.0.2.15,192.168.59.103 --ca=/var/lib/boot2docker/tls/ca.pem --ca-key=/var/lib/boot2docker/tls/cakey.pem --cert=/var/lib/boot2docker/tls/server.pem --key=/var/lib/boot2docker/tls/serverkey.pem
2015/06/26 02:49:48 Generating a server cert

it worked.

@stebunovd

Copy link
Copy Markdown

+1 for comment above.

Original script mentioned in this gist causes my boot2docker machine to hang on start, and the only solution which remains after it is to delete it and re-init back. Instead of this I tried stopping and starting docker daemon inside boot2docker machine and it worked for me.

@pencilcheck

Copy link
Copy Markdown

The original script works but the boot2docker will hang on start, instead of deleting the image I force poweroff and restart and it boots right into it immediately, hooray!

@mkjsix

mkjsix commented Jun 30, 2015

Copy link
Copy Markdown

Same here: it hangs on start after applying this patch, so I forced a poweroff of the VM and then restarted successfully.
If I just run boot2docker delete, boot2docker init, boot2docker up it works but then the second time I stop and start it I again see the certificate error, while after applying this solution it disappears permanently.

@jluna79

jluna79 commented Jul 4, 2015

Copy link
Copy Markdown

After applying the proposed fix and launching boot2docker the machine would go into an indefinite wait:

Waiting for VM and Docker daemon to start.................oooooo

I had to stop, delete and recreate the VM and then followed @y16ra's comment. Everything went back to working normally.

+1

ghost commented Jul 7, 2015

Copy link
Copy Markdown

👍

@JesusLeon

Copy link
Copy Markdown

@adamkdean that worked for me:

boot2docker delete
boot2docker init
boot2docker up

@josephwinston

Copy link
Copy Markdown

Thank you

@marcojonker

Copy link
Copy Markdown

Thanks, works for me on Windows 7.

@pengswift

Copy link
Copy Markdown

@y16ra
got it, thank you.

@mildronize

Copy link
Copy Markdown

I was facing the problem as @jluna79.
Thank you for @y16ra's comment. It works for me on windows 8.1

@Elijen

Elijen commented Aug 8, 2015

Copy link
Copy Markdown

The @y16ra's comment seems to be deleted. Can anyone paste here the solution, please? My boot2docker also hangs on start

@jlucasps

jlucasps commented Aug 9, 2015

Copy link
Copy Markdown

Followed @y16ra suggestion and it worked.
(At least for now. Still don't know if I need to repeat the procedure in the future.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment