@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class DockerCommand extends Object
Modifier | Constructor and Description |
---|---|
protected |
DockerCommand(String command) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCommandArguments(String key,
String value)
Add command commandWithArguments - this method is only meant for use by
sub-classes.
|
String |
getCommandOption()
Returns the docker sub-command string being used
e.g 'run'.
|
Map<String,List<String>> |
getDockerCommandWithArguments() |
PrivilegedOperation |
preparePrivilegedOperation(DockerCommand dockerCommand,
String containerName,
Map<String,String> env,
Context nmContext)
Prepare the privileged operation object that will be used to invoke
the container-executor.
|
void |
setClientConfigDir(String clientConfigDir)
Add the client configuration directory to the docker command.
|
String |
toString() |
protected DockerCommand(String command)
public final String getCommandOption()
protected final void addCommandArguments(String key, String value)
key
- name of the key to be addedvalue
- value of the keypublic void setClientConfigDir(String clientConfigDir)
clientConfigDir
- - directory containing the docker client config.public PrivilegedOperation preparePrivilegedOperation(DockerCommand dockerCommand, String containerName, Map<String,String> env, Context nmContext) throws ContainerExecutionException
dockerCommand
- Specific command to be run by docker.containerName
- env
- nmContext
- ContainerExecutionException
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.