mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
My changes may not be quite correct, but as far as I can tell, DOCKER_OPTIONS now requires specifying a phase explicitly. Also updated references to `--link` since `-link` has been deprecated in Docker.
1.7 KiB
1.7 KiB
docker-options
Usage
$ 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
$ dokku docker-options:add myapp deploy "-v /host/path:/container/path"
$ dokku docker-options:add myapp run "-v /another/container/path"
Check what we added
$ dokku docker-options myapp
Run options:
--link container_name:alias
-v /host/path:/container/path
-v /another/container/path
Remove an option
$ dokku docker-options:remove myapp run "--link container_name:alias"
Advanced Usage (avoid if possible)
In your applications folder (/home/dokku/app_name) create a file called DOCKER_OPTIONS_RUN (or DOCKER_OPTIONS_BUILD or DOCKER_OPTIONS_DEPLOY).
Inside this file list one docker option per line. For example:
--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 docker run:
--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/ .