Class Remove.RemoveContainer
- java.lang.Object
-
- com.oracle.bedrock.runtime.docker.commands.AbstractDockerCommand<C>
-
- com.oracle.bedrock.runtime.docker.commands.CommandWithArgumentList<R>
-
- com.oracle.bedrock.runtime.docker.commands.Remove<Remove.RemoveContainer>
-
- com.oracle.bedrock.runtime.docker.commands.Remove.RemoveContainer
-
- All Implemented Interfaces:
com.oracle.bedrock.runtime.MetaClass<com.oracle.bedrock.runtime.Application>
public static class Remove.RemoveContainer extends Remove<Remove.RemoveContainer>
A representation of a Docker command to remove one or more containers (equates to the Docker rm command).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.oracle.bedrock.runtime.docker.commands.Remove
Remove.RemoveContainer, Remove.RemoveImage, Remove.RemoveLink
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Remove.RemoveContainerandVolumes()Remove the volumes associated with the container (equates to the --volumes argument).Remove.RemoveContainerandVolumes(boolean remove)Remove the volumes associated with the container (equates to the --volumes argument).Remove.RemoveContainerforce()Force removal of the container (equates to the --force argument).Remove.RemoveContainerforce(boolean force)Force removal of the container (equates to the --force argument).protected Remove.RemoveContainerwithCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> containers, com.oracle.bedrock.runtime.options.Argument... args)Obtain a copy of thisCommandWithArgumentListwith the addition of the specified command argumentsArguments.protected Remove.RemoveContainerwithoutCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)Obtain a copy of thisCommandWithArgumentListwithout the the specified command argumentsArguments.-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.Remove
containers, containers, images, images, link
-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.CommandWithArgumentList
onLaunch, withCommandArguments, withoutCommandArguments
-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.AbstractDockerCommand
getCommandArguments, getImplementationClass, getTimeout, onLaunched, onLaunching, timeoutAfter, timeoutAfter
-
-
-
-
Method Detail
-
force
public Remove.RemoveContainer force()
Force removal of the container (equates to the --force argument).- Returns:
- a new
Remove.RemoveContainerinstance that is the same as this instance with the --force option applied
-
force
public Remove.RemoveContainer force(boolean force)
Force removal of the container (equates to the --force argument).- Parameters:
force- true to add the--forceoption or false to remove the--forceoption- Returns:
- a new
Remove.RemoveContainerinstance that is the same as this instance with the --force option applied
-
andVolumes
public Remove.RemoveContainer andVolumes()
Remove the volumes associated with the container (equates to the --volumes argument).- Returns:
- a new
Remove.RemoveContainerinstance that is the same as this instance with the --volumes option applied
-
andVolumes
public Remove.RemoveContainer andVolumes(boolean remove)
Remove the volumes associated with the container (equates to the --volumes argument).- Parameters:
remove- true to add the--volumesoption, false to remove the--volumesoption- Returns:
- a new
Remove.RemoveContainerinstance that is the same as this instance with the --volumes option applied
-
withCommandArguments
protected Remove.RemoveContainer withCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> containers, com.oracle.bedrock.runtime.options.Argument... args)
Description copied from class:CommandWithArgumentListObtain a copy of thisCommandWithArgumentListwith the addition of the specified command argumentsArguments.- Specified by:
withCommandArgumentsin classCommandWithArgumentList<Remove.RemoveContainer>- Parameters:
containers- theListofArgumentsthat appear at the end of the command lineargs- the new command to add- Returns:
- a copy of this
CommandWithArgumentListwith the addition of the specified command argumentsArguments
-
withoutCommandArguments
protected Remove.RemoveContainer withoutCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)
Description copied from class:CommandWithArgumentListObtain a copy of thisCommandWithArgumentListwithout the the specified command argumentsArguments.- Specified by:
withoutCommandArgumentsin classCommandWithArgumentList<Remove.RemoveContainer>- Parameters:
names- theListofArgumentsthat appear at the end of the command lineargs- the new command to add- Returns:
- a copy of this
CommandWithArgumentListwithout the specified command argumentsArguments
-
-