Monday, March 7, 2016

Moving from boot2docker to Docker Toolbox


Docker Toolbox comes from Docker, Inc as an improved way of creating your docker containers. I believe it uses boot2docker underneath. Here are quick instructions on getting set up:
  1. Download Docker Toolbox from here: [Choose the Mac download].
  2. Go ahead with the installation as suggested here.
  3. While verifying the installation, you can also run the following:
    • . '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'
    • You can either run the above script or just run "Docker QuickStart Terminal" via spotlight.
Now to get started, run the following:
  • docker-machine start default
    • the above will start the vm
  • eval "$(docker-machine env default)"
    • the above will set the needed env variables
  • docker images
    • the image listing should appear after that.
The equivalent of "boot2docker ssh" is now "docker-machine ssh default". You'll need to do this to set up insecure registries, etc. After updating the proflile file (/var/lib/boot2docker/profile), you can restart the vm by "docker-machine restart default".