sixeyed / docker-on-windows

Code samples for the book "Docker on Windows"
https://www.amazon.com/gp/product/1789617375/
Apache License 2.0
228 stars 125 forks source link

G drive solution not work for nodejs inside mount volume in windows container #9

Open GANG-CHEN-1 opened 5 years ago

GANG-CHEN-1 commented 5 years ago

issue Use windows nodejs image (server core in 1803/1809) to build html source code in a mount volume(docker volume, host-volume and G driver solution), all build in mount volume are failure when in lerna bootstrap with the same kind of Error "Error: EPERM: operation not permitted, symlink".

Expected behavior Use windows nodejs image to build source code in a mount volume, npm install successfully

Actual behavior npm WARN uid-web@1.1.0 requires a peer of zone.js@^0.8.29 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@0.3.8 (node_modules\json-sass\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@0.3.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Environment Information Windows Version: windows 10 1809 Docker Desktop Version: 19.03.2

docker file you can find docker file from https://raw.githubusercontent.com/StefanScherer/dockerfiles-windows/master/node/10/Dockerfile, only add below 2 line for your G drive solution

VOLUME C:\data RUN Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices' -Name 'G:' -Value "\??\C:\data" -Type String;


Steps to reproduce the behavior

  1. docker run -ti --name docker-bld3 -v C:\dckvol:c:/data -w /data node:10.16.3-winsevercore1803 powershell
  2. check source code to /data and build inside it.