Running the ironworker tutorial on OSX

I've been trying out ironworker to check out its asynchronous, (almost?) serverless job running abilities. I've had a lot of trouble getting Docker working in OSX, mainly network-related.

I've been concentrating on ironworker's node.js example. The first stumbling block I hit was that the first docker command in the tutorial:

docker run --rm -v "$PWD":/worker -w /worker iron/node:dev npm install

The reason being that npm couldn't see out to the great beyond:

npm WARN package.json @ No repository field.
npm WARN package.json @ No license field.
npm ERR! Linux 4.1.13-boot2docker
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v4.1.2
npm ERR! npm v2.14.4
npm ERR! code EAIFAIL
npm ERR! errno EAI
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo EAI_FAIL
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR! /worker/npm-debug.log

This is easily fixed on an adhoc basis by adding a dns flag to the command, eg:

docker run --rm -v "$PWD":/worker --dns -w /worker iron/node:dev npm install

I don't as yet know what to do to fix this permanently.

The second issue, which is merely something not spelled out explicitly in the tutorial, is that an iron.js file needs to be present before zipping up the project for upload. This file contains the project id for ironworker. Without it you get:

iron worker upload --name hellojs --zip iron/node node hello.js
did not find project id in any config files or env variables

Thereafter everything went smoothly.