Easily Install Docker on OS X

I tried recently to install docker on my mac. The problem with the mac port is that it needs a VM that runs linux to properly execute it locally. I found this guide.

In short, it uses a Virtual box image to run the app. The whole process can be simplified by using homebrew. Just execute the following commands on a console:

brew update
brew tap phinze/homebrew-cask
brew install brew-cask
brew cask install virtualbox
brew install docker
brew install boot2docker
boot2docker init
boot2docker up

… then export the three environment variables and you are ready.

Note: The default image size created by boot2docker has only 4GB hard disk space. Make sure that you have all the required parameters in place when you launch your docker instance, since later on it’s a fuss to resize the HD. 🙂
Note 2: I think that docker is a dependency of boot2docker, so you really need to install boot2docker only.

docker-logo-loggedout

Webapp2 and Appengine 1.6.1 – Bug

One quick bug/tip that might save you lots of time. 🙂 If you use Google’s appengine along with the webapp2 and using the Users module, you might encounter the following problem.

Recently, the ndb graduated and its python module changed from ndb to google.appengine.ext.ndb. Webapp2 is bundled along with the SDK of appengine, but it seems they forgot to update some modules in it, and they still use the previous package.

I encountered it when I tried to debug my application locally, using the webapp2 user & authentication module, the application crashes from the bad import. When you deploy the application to the appengine server, you must provide a version of the webapp2, which overrides this problem (this worked as a workaround for me at least), thus the problem will not occur. But locally, you must go the installation directory of the appengine and delete it manually.

I spotted this bug roughly a month ago (23/12/2011), and there may be some fixes on the mainstream webapp2 release.

Update (18/2/2012): The problem still persists in version 1.6.2 of the appengine SDK for python.