forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCopyArchiveToContainerCmd.java
More file actions
81 lines (62 loc) · 2.58 KB
/
Copy pathCopyArchiveToContainerCmd.java
File metadata and controls
81 lines (62 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.github.dockerjava.api.command;
import java.io.InputStream;
import com.github.dockerjava.api.exception.NotFoundException;
public interface CopyArchiveToContainerCmd extends SyncDockerCmd<Void> {
String getContainerId();
String getHostResource();
InputStream getTarInputStream();
boolean isNoOverwriteDirNonDir();
boolean isDirChildrenOnly();
boolean isCopyUIDGID();
/**
* Set container's id
*
* @param containerId
* id of the container to copy file to
*/
CopyArchiveToContainerCmd withContainerId(String containerId);
/**
* Set path to the resource on the host machine
*
* @param resource
* path to the resource on the host machine
*/
CopyArchiveToContainerCmd withHostResource(String resource);
/**
* Set the tar input stream that will be uploaded to the container. withHostResource or withTarInputStream can be defined but not both.
*
* @param tarInputStream
* the stream to upload to the container
*/
CopyArchiveToContainerCmd withTarInputStream(InputStream tarInputStream);
/**
* 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
*
* @param noOverwriteDirNonDir
* flag to know if non directory can be overwritten
*/
CopyArchiveToContainerCmd withNoOverwriteDirNonDir(boolean noOverwriteDirNonDir);
/**
* If set to true then ownership is set to the user and primary group at the destination
*
* @param copyUIDGID
* flag to know if ownership should be set to the user and primary group at the destination
*/
CopyArchiveToContainerCmd withCopyUIDGID(boolean copyUIDGID);
/**
* If this flag is set to true, all children of the local directory will be copied to the remote without the root directory. For ex: if
* I have root/titi and root/tata and the remote path is /var/data. dirChildrenOnly = true will create /var/data/titi and /var/data/tata
* dirChildrenOnly = false will create /var/data/root/titi and /var/data/root/tata
*
* @param dirChildrenOnly
* if root directory is ignored
*/
CopyArchiveToContainerCmd withDirChildrenOnly(boolean dirChildrenOnly);
String getRemotePath();
CopyArchiveToContainerCmd withRemotePath(String remotePath);
@Override
Void exec() throws NotFoundException;
interface Exec extends DockerCmdSyncExec<CopyArchiveToContainerCmd, Void> {
}
}