Instead
RUN npm install --global gulp -y
using
RUN sudo npm install --global gulp -y
You are trying to install gulp as a global package from user node (not superuser).
Or install gulp before switching the user to node.
USER node RUN npm install --global gulp -y
EDIT:
boot2docker is based on VirtualBox . For security reasons, Virtualbox does not allow symbolic links in public folders.
To enable symbolic links, you must set VBoxInternal2 / SharedFoldersEnableSymlinksCreate / SHARE_NAME to 1 . (Here's a link to a description of how to do this on Vargrant: Symbolic links and synchronized folders in Vagrant )
VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1
Replace VM_NAME and SHARE_NAME and restart VirtualBox.
Another solution is to add --no-bin-link to npm :
RUN npm install -g bower --no-bin-link RUN npm install --global gulp -y --no-bin-link
EDIT 2
By default, Windows 7 security policy does not allow the creation of symbolic links, as this is a potential security risk. If the user is not a member of the Administrators group, run secpol.msc and go to Local Policies - User Rights Assignments and add the user to Create symbolic links .
If your user belongs to the Administrators group, start VirtualBox using Run as administrator .
Tomasz Jakub Rup
source share