CIFS issues during npm install

FYI, I have managed to resolve my issue in a rather complicated, round about way… by mounting my own shared directories on the linux host with more appropriate options. I am using the following mount command:

mount -t cifs //10.0.75.1/C /C -o rw,vers=3.02,username=,domain=,uid=0,noforceuid,gid=0,noforcegid,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,noperm,rsize=61440,wsize=4292,actimeo=1,mfsymlinks,cache=none

This forces the use of a more recent version of the SMB protocol which is more efficent and has better error recovery. It also allows symlinks to be created in linux, although those links won’t be valid in windows.

However, in order to get to the point where I can execute this command and have it stick I’ve had to construct a docker image which contains nsenter and allows me to connect to the linux host. My Dockerfile looks like this:

FROM alpine
RUN apk update && \
    apk add util-linux && \
    rm -rf /var/cache/apk/*
ENTRYPOINT ["nsenter"]
CMD ["--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid", "/bin/sh"]

And I use this batch file to execute it from the command line:

@echo off
docker build ./ -t hostenter
docker run --rm -it --privileged --pid=host hostenter

Please take it as a feature request to use a more recent version of the SMB protocol as it has dramatically improved the stability of my maven/node builds as they pull from cache shared from the host computer.