How to mount host volumes into docker containers in Dockerfile during build
Original question: How to use the VOLUME instruction in Dockerfile? 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 . The reason behind it, for me, is when building things in Docker, I don't want those ( apt-get install ) caches locked in a single docker, but to share/reuse them. That's the main reason I'm asking about this question. Latest Update: Before docker v18.09, the correct answer should be the one that starts with: There is a way to mount