Add option to remove a volume, when removing docker container

This commit is contained in:
Jakub Bartecek 2015-05-04 16:45:25 +02:00 committed by Ignasi Barrera
parent 26d925c2de
commit 867b7f52e4
1 changed files with 19 additions and 0 deletions

View File

@ -29,6 +29,17 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
this.queryParameters.put("force", force.toString());
return this;
}
/**
* Remove the volumes associated to the container
*
* @param volume If set to true the volume associated to the container will be removed.
* Otherwise it will not be removed.
*/
public RemoveContainerOptions volume(Boolean volume) {
this.queryParameters.put("v", volume.toString());
return this;
}
public static class Builder {
/**
@ -46,5 +57,13 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
RemoveContainerOptions options = new RemoveContainerOptions();
return options.force(force);
}
/**
* @see RemoveContainerOptions#volume
*/
public static RemoveContainerOptions volume(Boolean volume) {
RemoveContainerOptions options = new RemoveContainerOptions();
return options.volume(volume);
}
}
}