RESOLVED - Automated build fails on Docker hub but works locally

EDIT: It seems to have been a network error. Just after finishing this I checked again and the build succeeded.

I’m working on making my first Dockerfile for my team to use. I’ve run into a problem I can’t figure out though. Here’s the Dockerfile…
FROM node:8.1-alpine WORKDIR /project RUN apk update && apk add bash \ && npm install -g gulp-cli webpack \ && npm install -g -s --no-progress yarn \ && yarn add --dev gulp \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* EXPOSE 3000 CMD yarn install && gulp

This works fine locally (OSX 10.11.6 with Docker Community Edition 17.06.0-ce-mac18). I tried double checking by deleting the image and re-building with --no-cache. However, when I push it to bitbucket and then the docker hub automatic build process starts, it’s breaking with this message at the end of the build

    at Object.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli/commands/index.js:322:29)
    at Module._compile (/usr/local/lib/node_modules/yarn/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (/usr/local/lib/node_modules/yarn/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at _load_index3 (/usr/local/lib/node_modules/yarn/lib/cli/index.js:18:43)
    at Object.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli/index.js:136:54)
e[0m``` 

This is followed by the error `The command '/bin/sh -c apk update && apk add bash     && npm install -g gulp-cli webpack     && npm install -g -s --no-progress yarn     && yarn add --dev gulp     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 1`. Can anyone help me understand what the issue is here?