简体   繁体   中英

Docker - Error: EEXIST: file already exists, symlink

I have developed a small "proof of concept" ApostropheCMS application. The application runs fine with node app.js . I'm trying to build and deploy with Docker for Windows on Windows 7 with Oracle VM VirtualBox following this tutorial .

I am able to deploy the mongo image . I am able to build my application image using the default Dockerfile. When I attempt to run my application, docker image linked with the mongo image I receive the following error:

$ docker run --link=ato-home-db:mongodb -p 3000:3000 ato-home-webapp

ato-home-webapp@2.0.0 start /app node app.js fs.js:1014 return binding.symlink(preprocessSymlinkDestination(target, type, path), ^ Error: EEXIST: file already exists, symlink '/app/node_modules/apostrophe/lib/modules/apostrophe-assets/public' -> '/app/public/modules/apostrophe-assets' at Object.fs.symlinkSync (fs.js:1014:18) at Object.self.linkAssetFolderOnUnix (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:646:10) at Object.self.linkAssetFolder (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:612:14) at /app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:578:14 at /app/node_modules/@sailshq/lodash/lib/index.js:3253:15 at baseForOwn (/app/node_modules/@sailshq/lodash/lib/index.js:2223:14) at /app/node_modules/@sailshq/lodash/lib/index.js:3223:18 at Function. (/app/node_modules/@sailshq/lodash/lib/index.js:3526:13) at self.symlinkModules (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:574:9) at /app/node_modu les/async/lib/async.js:718:13 at iterate (/app/node_modules/async/lib/async.js:262:13) at async.forEachOfSeries.async.eachOfSeries (/app/node_modules/async/lib/async.js:281:9) at _parallel (/app/node_modules/async/lib/async.js:717:9) at Object.async.series (/app/node_modules/async/lib/async.js:739:9) at Object.self.afterInit (/app/node_modules/apostrophe/lib/modules/apostrophe-assets/index.js:521:20) at invoke (/app/node_modules/apostrophe/index.js:423:23) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ato-home-webapp@2.0.0 start: node app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ato-home-webapp@2.0.0 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/2018-08-07T00_15_24_396Z-debug.log

I'm hoping for a possible solution or suggestions for ApostropheCMS tutorials or "How Tos" to get past this roadblock.

I am new to ApostropheCMS and Docker. Any input would be greatly appreciated. I can supply additional information if helpful.

I'm going to assume that you're building your image on Windows (to a Linux container). Please try rebuilding your image in a Unix environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM