Skip to content

Conversation

@crosbymichael
Copy link
Contributor

Add the VOLUME instruction to the Dockerfile builder.

FROM ubuntu
VOLUME ["/data"]

OR

FROM ubuntu
VOLUME /data
@shykes
Copy link
Contributor

shykes commented Jul 8, 2013

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.

@crosbymichael
Copy link
Contributor Author

Thanks for the feedback. Done!

@vieux
Copy link
Contributor

vieux commented Jul 10, 2013

@crosbymichael could you rebase to master ? tests are broken.

Thanks

@shykes
Copy link
Contributor

shykes commented Jul 12, 2013

LGTM

1 similar comment
@creack
Copy link
Contributor

creack commented Jul 12, 2013

LGTM

creack added a commit that referenced this pull request Jul 12, 2013
+ Builder: Add VOLUME instruction to buildfile
@creack creack merged commit 637eceb into moby:master Jul 12, 2013
@matthewmueller
Copy link
Contributor

Is volume host:container supported? Or volume [host:container]?

I wasn't able to get that working.

@crosbymichael
Copy link
Contributor Author

@matthewmueller no, host mounts are not supported in the Dockerfile

@matthewmueller
Copy link
Contributor

@crosbymichael should they be? It seems like an asymmetry between the CLI and the Dockerfile.

@crosbymichael
Copy link
Contributor Author

No. Dockerfiles should be portable.

On Saturday, August 17, 2013, Matthew Mueller wrote:

@crosbymichael https://github.com/crosbymichael should they be? It
seems like an asymmetry between the CLI and the Dockerfile.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1124#issuecomment-22824254
.

Thanks,


Michael Crosby
812-250-6603
crosby.michael@gmail.com

@matthewmueller
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6 participants