2017-09-19 1 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를 사용하고 있기 때문입니까? 나는 내 Mac이 "Mac 용 Docker"를 실행하고 있기 때문에 이것이일지도 모른다고 생각합니다. 프로가 설치되어 있지 않기 때문에 "Windows 용 Docker"를 설치할 수 없습니다. Docker Toolbox가 파일 이벤트 알림을 지원하지 않지만 공식 문서를 찾을 수없는 일부 의견은 어딘가에서 읽었습니다. – roocell

+0

Windows 용 Docker로 업그레이드 할 수 있습니까? Windows 10 프로가 필요합니다. –

+0

아, 당신이 대답 한 것을 봅니다. 예, Docker Toolbox는 파일 이벤트 알림을 지원하지 않습니다. 나는 Docker에서 일하고 확인할 수 있습니다. 확인을 위해 –

답변

0

Docker Toolbox는 파일 시스템 이벤트 알림을 지원하지 않습니다. (Docker dev Mano Marks에 의해 확인 됨). 작동하려면 "Docker for Windows"를 사용해야합니다.

추측 MSFT가 나에게 몇 달러를주고 있습니다.

관련 문제