public class CopyArchiveToContainerCmdImpl extends AbstrDockerCmd<CopyArchiveToContainerCmd,Void> implements CopyArchiveToContainerCmd
CopyArchiveToContainerCmd.Exec
execution
Constructor and Description |
---|
CopyArchiveToContainerCmdImpl(CopyArchiveToContainerCmd.Exec exec,
String containerId) |
Modifier and Type | Method and Description |
---|---|
Void |
exec() |
String |
getContainerId() |
String |
getHostResource() |
String |
getRemotePath() |
InputStream |
getTarInputStream() |
boolean |
isDirChildrenOnly() |
boolean |
isNoOverwriteDirNonDir() |
String |
toString() |
CopyArchiveToContainerCmd |
withContainerId(String containerId)
Set container's id
|
CopyArchiveToContainerCmd |
withDirChildrenOnly(boolean dirChildrenOnly)
If this flag is set to true, all children of the local directory will be copied to the remote without the root directory.
|
CopyArchiveToContainerCmd |
withHostResource(String hostResource)
Set path to the resource on the host machine
|
CopyArchiveToContainerCmd |
withNoOverwriteDirNonDir(boolean noOverwriteDirNonDir)
If set to true then it will be an error if unpacking the given content would cause an existing directory to be replaced with a
non-directory and vice versa
|
CopyArchiveToContainerCmd |
withRemotePath(String remotePath) |
CopyArchiveToContainerCmd |
withTarInputStream(InputStream tarInputStream)
Set the tar input stream that will be uploaded to the container.
|
close, registryAuth
public CopyArchiveToContainerCmdImpl(CopyArchiveToContainerCmd.Exec exec, String containerId)
public CopyArchiveToContainerCmd withContainerId(String containerId)
CopyArchiveToContainerCmd
withContainerId
in interface CopyArchiveToContainerCmd
containerId
- id of the container to copy file topublic CopyArchiveToContainerCmd withHostResource(String hostResource)
CopyArchiveToContainerCmd
withHostResource
in interface CopyArchiveToContainerCmd
hostResource
- path to the resource on the host machinepublic CopyArchiveToContainerCmd withNoOverwriteDirNonDir(boolean noOverwriteDirNonDir)
CopyArchiveToContainerCmd
withNoOverwriteDirNonDir
in interface CopyArchiveToContainerCmd
noOverwriteDirNonDir
- flag to know if non directory can be overwrittenpublic CopyArchiveToContainerCmd withRemotePath(String remotePath)
withRemotePath
in interface CopyArchiveToContainerCmd
public CopyArchiveToContainerCmd withTarInputStream(InputStream tarInputStream)
CopyArchiveToContainerCmd
withTarInputStream
in interface CopyArchiveToContainerCmd
tarInputStream
- the stream to upload to the containerpublic CopyArchiveToContainerCmd withDirChildrenOnly(boolean dirChildrenOnly)
CopyArchiveToContainerCmd
withDirChildrenOnly
in interface CopyArchiveToContainerCmd
dirChildrenOnly
- if root directory is ignoredpublic InputStream getTarInputStream()
getTarInputStream
in interface CopyArchiveToContainerCmd
public String getContainerId()
getContainerId
in interface CopyArchiveToContainerCmd
public String getHostResource()
getHostResource
in interface CopyArchiveToContainerCmd
public boolean isNoOverwriteDirNonDir()
isNoOverwriteDirNonDir
in interface CopyArchiveToContainerCmd
public String getRemotePath()
getRemotePath
in interface CopyArchiveToContainerCmd
public boolean isDirChildrenOnly()
isDirChildrenOnly
in interface CopyArchiveToContainerCmd
public String toString()
toString
in class AbstrDockerCmd<CopyArchiveToContainerCmd,Void>
public Void exec() throws NotFoundException
exec
in interface CopyArchiveToContainerCmd
exec
in interface SyncDockerCmd<Void>
exec
in class AbstrDockerCmd<CopyArchiveToContainerCmd,Void>
NotFoundException
- No such containerCopyright © 2016. All Rights Reserved.