Docker for WindowsでRails5.1 + Vue.js環境を構築しようと、rails webpacker:installを実行すると下記のエラーが出力され処理が正常完了しません。

エラーメッセージ

docker-compose run web rails webpacker:install
create  app/javascript
create  app/javascript/packs/application.js
exist  bin
create  bin/webpack-dev-server
create  bin/webpack-watcher
create  bin/webpack
identical  bin/yarn
create  config/webpack
create  config/webpack/development.js
create  config/webpack/production.js
create  config/webpack/shared.js
append  .gitignore
run  ./bin/yarn add webpack webpack-merge path-complete-extname babel-loader babel-core babel-preset-env coffee-loader coffee-script compression
-webpack-plugin rails-erb-loader glob from "."
yarn add v0.21.3
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "ajv-keywords@1.5.1" has unmet peer dependency "ajv@>=4.10.0".
warning "babel-loader@6.4.0" has unmet peer dependency "babel-core@^6.0.0".
warning "babel-loader@6.4.0" has unmet peer dependency "webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc".
warning "coffee-loader@0.7.3" has unmet peer dependency "coffee-script@1.x".
error An unexpected error occurred: "EINVAL: invalid argument, symlink '../../../acorn/bin/acorn' -> '/myapp/node_modules/acorn-dynamic-import/node_modul
es/.bin/acorn'".
info If you think this is a bug, please open a bug report with the information provided in "/myapp/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
run  ./bin/yarn add --dev webpack-dev-server from "."
yarn add v0.21.3
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "webpack-dev-middleware@1.10.1" has unmet peer dependency "webpack@1 || ^2.1.0-beta || ^2.2.0-rc.0".
warning "webpack-dev-server@2.4.1" has unmet peer dependency "webpack@^2.2.0".
error An unexpected error occurred: "EINVAL: invalid argument, symlink '../../../semver/bin/semver' -> '/myapp/node_modules/normalize-package-data/node_m
odules/.bin/semver'".
info If you think this is a bug, please open a bug report with the information provided in "/myapp/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Docker for Macではここの処理は正常に完了するのにWindowsがホストの場合にこのエラーがでます。
色々調べた結果おそらく、下記のいずれかが原因だと思うのですが対処方法がわかりません。

  • WinsowsのPathの最大長制限(260文字)に引っかかっている
  • ホストOSがWindowsの場合、シンボリックリンク(symlink)をサポートしていない

WinsowsのPathの最大長制限を解除するためのグループポリシーの設定変更で「Win32の長いパスを有効にする」を有効にしてみても事象は改善されないので、やはりWindowsがsymlinkにサポートしていない、というのが原因のようです。

どなたか対処方法がわかったら教えてください。