0

What is the unique value of using the VOLUME keyword in a Dockerfile given that it's possible to mount volumes to images that don't use it?

nickform
  • 1,573
  • 2
  • 12
  • 18
  • No two ways about it: having this question closed by secret ballot after having put effort into writing it puts me off posting to the site in future. Surely asking the purpose of something of human design is not opinion based? [This](https://stackoverflow.com/questions/43981040/what-does-volume-command-do-in-dockerfile) question is getting at the same thing but because the title asks what the keyword does, the answers miss the main point. – nickform Sep 11 '20 at 12:04
  • Have substantially cut down the number of words to emphasise what I think is a valid, non-opinion-based question about the use cases for a very specific part of the Dockerfile language. Answers to this question are correct or not and the range of possible advantages is very well bounded. People _might_ reply with their own hypotheses about the intention rather than authoritative answers but I don't agree that that possibility means that the question itself is opinion-based. I hope it will get its "day in court" with people who might know the answer. Thanks for reading. – nickform Sep 11 '20 at 12:34
  • 4
    If this weren't already closed, I'd close it as a dupe of [what does VOLUME command do in Dockerfile?](https://stackoverflow.com/questions/43981040/what-does-volume-command-do-in-dockerfile), or [What is the practical purpose of VOLUME in Dockerfile?](https://stackoverflow.com/questions/52570093/what-is-the-practical-purpose-of-volume-in-dockerfile). – David Maze Sep 11 '20 at 13:28
  • 2
    Thanks so much @DavidMaze!! That question is exactly what I was looking for and has a good quality answer confirming my suspicions. I don't seem to be able rescind my vote to reopen this one but you are dead right that it is a dupe of the one you reference and should remain closed on those grounds. Also _mea culpa_ for not trying more different phrasings of my question before posting. Thanks again - this has an immediate impact on something I'm writing. – nickform Sep 11 '20 at 13:49

0 Answers0