npm installs packages from a npm-shrinkwrap.json if one exists. They way in which the Dockerfile for onbuild is structured, npm will never install from npm-shrinkwrap.json.
https://github.com/nodejs/docker-node/blob/master/0.12/onbuild/Dockerfile#L6