Add VOLUME instruction to buildfile by crosbymichael · Pull Request #1124 · moby/moby
Add the VOLUME instruction to the Dockerfile builder.
FROM ubuntu
VOLUME ["/data"]
OR
FROM ubuntu
VOLUME /data
Hey @crosbymichael, thanks for contributing this. Would you mind adding a test which makes sure that the built image does indeed expose a volume at the given path? Your test does verify that the keyword doesn't cause a build to fail, but that's currently the case for all keywords since they are ignored by default.
Happy to help, and looking forward to merging this.
creack added a commit that referenced this pull request
Jul 12, 2013@crosbymichael should they be? It seems like an asymmetry between the CLI and the Dockerfile.
Oh good point, so it seems like VOLUME is more to serve volumes-from then because an empty volume inside a container isn't very useful
wking
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters