Refactored to use docker-api gem.