feat: implement docker-options:clear

Closes #3776
This commit is contained in:
Jose Diaz-Gonzalez
2020-02-01 17:06:27 -08:00
parent dcb79f8c0b
commit fc8a8d6138
4 changed files with 107 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during D
```
docker-options:add <app> <phase(s)> OPTION # Add Docker option to app for phase (comma-separated phase list)
docker-options:clear <app> [<phase(s)>...] # Clear a docker options from application
docker-options:remove <app> <phase(s)> OPTION # Remove Docker option from app for phase (comma-separated phase list)
docker-options:report [<app>] [<flag>] # Displays a docker options report for one or more apps
```
@@ -44,6 +45,37 @@ dokku docker-options:add node-js-app run "-v /var/log/node-js-app:/app/logs"
dokku docker-options:remove node-js-app run "-v /var/log/node-js-app:/app/logs"
```
### Clear all Docker options for an app
Docker options can be removed for a specific app using the `docker-options:clear` command.
```shell
dokku docker-options:clear node-js-app
```
```
-----> Clearing docker-options for node-js-app on all phases
```
One or more valid phases can also be specified. Phases are comma delimited, and specifying an invalid phase will result in an error.
```shell
dokku docker-options:clear node-js-app run
```
```
-----> Clearing docker-options for node-js-app on phase run
```
```shell
dokku docker-options:clear node-js-app build,run
```
```
-----> Clearing docker-options for node-js-app on phase build
-----> Clearing docker-options for node-js-app on phase run
```
### Displaying docker-options reports for an app
> New as of 0.8.1