initial pass at including docker-options plugin. closes #1062

This commit is contained in:
Michael Hobbs
2015-04-01 12:21:45 -07:00
parent 89af9cf5db
commit df8f4fb882
7 changed files with 406 additions and 0 deletions

60
docs/docker-options.md Normal file
View File

@@ -0,0 +1,60 @@
docker-options
========================
Usage
-----
```bash
$ dokku help
...
docker-options <app> Display apps docker options for all phases
docker-options <app> <phase(s)> Display apps docker options for phase (comma seperated phase list)
docker-options:add <app> <phase(s)> OPTION Add docker option to app for phase (comma seperated phase list)
docker-options:remove <app> <phase(s)> OPTION Remove docker option from app for phase (comma seperated phase list)
...
````
Add some options
```bash
$ dokku docker-options:add myapp deploy "-v /host/path:/container/path"
$ dokku docker-options:add myapp run "-v /another/container/path"
$ dokku docker-options:add myapp "-link container_name:alias"
```
Check what we added
```bash
$ dokku docker-options myapp
-link container_name:alias
-v /host/path:/container/path
-v /another/container/path
```
Remove an option
```bash
$ dokku docker-options:remove myapp "-link container_name:alias"
```
Manual Usage
------------
In your applications folder (/home/dokku/app_name) create a file called DOCKER_OPTIONS.
Inside this file list one docker option per line. For example:
```bash
-link container_name:alias
-v /host/path:/container/path
-v /another/container/path
```
The above example will result in the following options being passed to docker during deploy and docker run:
```bash
-link container_name:alias -v /host/path:/container/path -v /another/container/path
```
You may also include comments (lines beginning with a #) and blank lines in the DOCKER_OPTIONS file.
Move information on docker options can be found here: http://docs.docker.io/en/latest/reference/run/ .

View File

@@ -17,6 +17,7 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
- [DNS Configuration](http://progrium.viewdocs.io/dokku/dns)
- [Nginx Configuration](http://progrium.viewdocs.io/dokku/nginx)
- [Running Remote commands](http://progrium.viewdocs.io/dokku/remote-commands)
- [Container Options](http://progrium.viewdocs.io/dokku/docker-options)
### Community Contributions