假设我的主机上有一个Docker容器和一个文件夹/hostFolder.现在,如果我要对这个文件夹添加到多克尔容器的体积,那么我可以通过使用这样做ADD在Dockerfile或安装它作为一个音量.
到现在为止还挺好.
现在/hostFolder包含一个子文件夹/hostFolder/subFolder.
我想挂载/hostFolder到泊坞容器(无论是读写或只读并不重要,无论是对我的作品),但我不希望把它列入/hostFolder/subFolder.我想排除这个,我也希望Docker容器能够对这个子文件夹进行更改,而不会在主机上更改它.
这可能吗?如果是这样,怎么样?
在与同事一起工作时,在执行npm安装时我遇到了以下问题,尽管我的同事都没有遇到同样的问题.我们都使用docker环境,linux容器.
这是错误:
npm install
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
> node-sass@4.9.3 install /var/www/node_modules/node-sass
> node scripts/install.js
fs.js:113
throw err;
^
Error: …Run Code Online (Sandbox Code Playgroud)