-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Docker volumes. #280
Conversation
Docker has a feature where it can import or export "volumes", or subtrees of the filesystem which can be shared in different ways between Docker containers, or between a container and the host machine. This adds the command to the Dockerfile which sets up the knowledge inside Docker. Also, if a directory is created which does not exist, it will be owned by root. This would be unfortunate if, for example, the exported directory was the logs/ directory for Play. So the directories are created beforehand.
@@ -27,12 +27,27 @@ trait DockerPlugin extends Plugin with UniversalPlugin { | |||
Some(Cmd("EXPOSE", exposedPorts.mkString(" "))) | |||
} | |||
|
|||
Dockerfile(dockerCommands ++ exposeCommand: _*).makeContent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for documenting these edge cases! Keep up the good work.
Could you write a small test case for this? It should be possible to check the resulting dockerfile? Thanks :) |
Added a positive test that the lines are present when the value is set. |
Perfect. Let's wait for travis and then this is good to merge. |
Great, thanks for your reviews 👍 |
Docker has a feature where it can import or export "volumes", or subtrees of
the filesystem which can be shared in different ways between Docker containers,
or between a container and the host machine.
This adds the command to the Dockerfile which sets up the knowledge inside
Docker. Also, if a directory is created which does not exist, it will be owned
by root. This would be unfortunate if, for example, the exported directory
was the logs/ directory for Play. So the directories are created beforehand.