-
Notifications
You must be signed in to change notification settings - Fork 1k
/
BuildImageCmd.java
151 lines (108 loc) · 3.01 KB
/
BuildImageCmd.java
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
package com.github.dockerjava.api.command;
import java.io.File;
import java.io.InputStream;
import java.net.URI;
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import com.github.dockerjava.api.model.AuthConfigurations;
import com.github.dockerjava.api.model.BuildResponseItem;
import com.github.dockerjava.core.RemoteApiVersion;
/**
* Build an image from Dockerfile.
* <p>
* TODO: http://docs.docker.com/reference/builder/#dockerignore
*
* @see <a
* href="https://docs.docker.com/reference/api/docker_remote_api_v1.20/#build-image-from-a-dockerfile">build-image-from-a-dockerfile</a>
*/
public interface BuildImageCmd extends AsyncDockerCmd<BuildImageCmd, BuildResponseItem> {
// lib specific
@CheckForNull
InputStream getTarInputStream();
@CheckForNull
AuthConfigurations getBuildAuthConfigs();
// getters
/**
* "t" in API
*/
@CheckForNull
String getTag();
/**
* "remote" in API
*/
@CheckForNull
URI getRemote();
/**
* "nocache" in API
*/
@CheckForNull
Boolean hasNoCacheEnabled();
/**
* "rm" in API
*/
@CheckForNull
Boolean hasRemoveEnabled();
/**
* "forcerm" in API
*/
@CheckForNull
Boolean isForcerm();
/**
* "q" in API
*/
@CheckForNull
Boolean isQuiet();
/**
* "pull" in API
*/
@CheckForNull
Boolean hasPullEnabled();
@CheckForNull
String getPathToDockerfile();
@CheckForNull
Long getMemory();
@CheckForNull
Long getMemswap();
@CheckForNull
String getCpushares();
@CheckForNull
String getCpusetcpus();
/**
* @since {@link RemoteApiVersion#VERSION_1_21}
*/
@CheckForNull
Map<String, String> getBuildArgs();
/**
*@since {@link RemoteApiVersion#VERSION_1_22}
*/
@CheckForNull
Long getShmsize();
// setters
BuildImageCmd withTag(String tag);
BuildImageCmd withRemote(URI remote);
BuildImageCmd withBaseDirectory(File baseDirectory);
BuildImageCmd withDockerfile(File dockerfile);
BuildImageCmd withNoCache(Boolean noCache);
BuildImageCmd withRemove(Boolean rm);
BuildImageCmd withForcerm(Boolean forcerm);
BuildImageCmd withQuiet(Boolean quiet);
BuildImageCmd withPull(Boolean pull);
BuildImageCmd withMemory(Long memory);
BuildImageCmd withMemswap(Long memswap);
BuildImageCmd withCpushares(String cpushares);
BuildImageCmd withCpusetcpus(String cpusetcpus);
/**
* @since {@link RemoteApiVersion#VERSION_1_21}
*/
BuildImageCmd withBuildArg(String key, String value);
// setters lib specific
BuildImageCmd withBuildAuthConfigs(AuthConfigurations authConfig);
BuildImageCmd withTarInputStream(@Nonnull InputStream tarInputStream);
/**
*@since {@link RemoteApiVersion#VERSION_1_22}
*/
BuildImageCmd withShmsize(Long shmsize);
interface Exec extends DockerCmdAsyncExec<BuildImageCmd, BuildResponseItem> {
}
}