How to mount host volumes into docker containers in Dockerfile during build
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Original question: How to use the VOLUME instruction in Dockerfile? Revised: update from the answer below, so the actual question I want to solve is -- how to mount host volumes into docker containers in Dockerfile during build, i.e., having the docker run -v /export:/export capability during docker build . Latest Update: There is a solution now. Although it is not strictly Docker, but " it solves all the weak points of Dockerfile ", so I think it is the perfect answer. Check my latest answer for details. Update: So the answer is "Not