Skip to content
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

Merged
merged 2 commits into from
Jun 23, 2014
Merged

Support Docker volumes. #280

merged 2 commits into from
Jun 23, 2014

Conversation

fiadliel
Copy link
Contributor

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.

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
Copy link
Contributor

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.

@muuki88
Copy link
Contributor

muuki88 commented Jun 23, 2014

Could you write a small test case for this? It should be possible to check the resulting dockerfile? Thanks :)

@fiadliel
Copy link
Contributor Author

Added a positive test that the lines are present when the value is set.

@muuki88
Copy link
Contributor

muuki88 commented Jun 23, 2014

Perfect. Let's wait for travis and then this is good to merge.

@fiadliel
Copy link
Contributor Author

Great, thanks for your reviews 👍

muuki88 added a commit that referenced this pull request Jun 23, 2014
@muuki88 muuki88 merged commit 1527da9 into sbt:master Jun 23, 2014
@fiadliel fiadliel deleted the wip/docker-volume branch June 26, 2014 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants