2017-09-19 4 views
0

win10でDocker Toolboxを使用しているunbuntu:最新のドッキング用コンテナを実行しています。 私はcreate-react-app npmを使って私のために反応するアプリケーションを自動的に作成します。 "npm start"を実行すると、次のエラーが発生します。Windowsドッカーコンテナで反応を実行しようとするとfswatchエラーが発生する

events.js:182 
     throw er; // Unhandled 'error' event 
    ^

Error: watch /frontend/public EMFILE 
    at _errnoException (util.js:1026:11) 
    at FSWatcher.start (fs.js:1383:19) 
    at Object.fs.watch (fs.js:1409:11) 
    at createFsWatchInstance (/frontend/node_modules/chokidar/lib/nodefs-handler.js:37:15) 
    at setFsWatchListener (/frontend/node_modules/chokidar/lib/nodefs-handler.js:80:15) 
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/frontend/node_modules/chokidar/lib/nodefs-handler.js:228:14) 
    at FSWatcher.NodeFsHandler._handleDir (/frontend/node_modules/chokidar/lib/nodefs-handler.js:407:19) 
    at FSWatcher.<anonymous> (/frontend/node_modules/chokidar/lib/nodefs-handler.js:455:19) 
    at FSWatcher.<anonymous> (/frontend/node_modules/chokidar/lib/nodefs-handler.js:460:16) 
    at FSReqWrap.oncomplete (fs.js:154:5) 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] start: `react-scripts start` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script. 
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

npm ERR! A complete log of this run can be found in: 
npm ERR!  /root/.npm/_logs/2017-09-19T00_53_33_776Z-debug.log 

非常にシンプルなものが - ここで私は私のMac上で同じdockerfileを構築することができ、私のdockerFile

FROM ubuntu:latest 

ENV DEBIAN_FRONTEND noninteractive 

RUN apt-get update 
RUN apt-get install -y apt-utils 
RUN apt-get install -y curl 
#RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - 
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - 
RUN apt-get install -y nodejs 

# install editor 
RUN apt-get install -y vim 

# install tools and create frontend 
RUN npm install -g create-react-app 
RUN create-react-app frontend 

# configure proxy (let's frontend talk to backend) 
RUN sed '$i,\n"proxy": "http://localhost:3001"' frontend/package.json >> frontend/package.json.new 
RUN cp frontend/package.json.new frontend/package.json 

WORKDIR /frontend 

# run the frontend 
CMD npm start 

だとそれが正常に動作します。 FSWatchは、ファイルが変更されているかどうかをチェックするライブラリです。正確に何が起こっているのかは分かりません。私は一種の困惑しています。 ご協力いただければ幸いです。

+0

「Docker for windows」ではなくDocker Toolboxを使用しているからですか?私は私のマックは "マックのためのドッカー"を実行しているので、これはそれかもしれないと推測していると動作します。私はプロがインストールされていないので、「Windows用Docker」をインストールできません。 私は、Docker Toolboxがファイルイベント通知をサポートしていないが、公式のドキュメントが見つからないという、いくつかのコメントスレッドのどこかで読んだことがあります。 – roocell

+0

Docker for Windowsにアップグレードする可能性はありますか? Windows 10プロが必要です。 –

+0

ああ、私はあなたがそれに答えたのを見ます。はい、Docker Toolboxはファイルイベント通知をサポートしていません。私はDockerで働いて確認することができます。 –

答えて

0

Docker Toolboxは、ファイルシステムのイベント通知をサポートしていません。 (Docker dev Mano Marksによって確認された)。 "Docker for Windows"を使用する必要があります。

推測MSFTは私から$$をいくつか作り出しています。

関連する問題