4
4
import com .github .dockerjava .api .exception .NotFoundException ;
5
5
import com .github .dockerjava .api .model .AuthConfig ;
6
6
import com .github .dockerjava .api .model .ExposedPort ;
7
+ import com .github .dockerjava .api .model .HealthCheck ;
7
8
import com .github .dockerjava .api .model .HostConfig ;
8
9
import com .github .dockerjava .api .model .Volume ;
9
10
@@ -16,171 +17,192 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
16
17
@ CheckForNull
17
18
AuthConfig getAuthConfig ();
18
19
20
+ /**
21
+ * While using swarm classic, you can provide an optional auth config which will be used to pull images from a private registry,
22
+ * if the swarm node does not already have the docker image.
23
+ * Note: This option does not have any effect in normal docker
24
+ *
25
+ * @param authConfig The optional auth config
26
+ */
27
+ CreateContainerCmd withAuthConfig (AuthConfig authConfig );
28
+
19
29
@ CheckForNull
20
30
List <String > getAliases ();
21
31
32
+ /**
33
+ * Add network-scoped alias for the container
34
+ *
35
+ * @param aliases on ore more aliases
36
+ */
37
+ CreateContainerCmd withAliases (List <String > aliases );
38
+
39
+ /**
40
+ * Add network-scoped alias for the container
41
+ *
42
+ * @param aliases on ore more aliases
43
+ */
44
+ CreateContainerCmd withAliases (String ... aliases );
45
+
22
46
@ CheckForNull
23
47
String [] getCmd ();
24
48
49
+ CreateContainerCmd withCmd (String ... cmd );
50
+
51
+ CreateContainerCmd withCmd (List <String > cmd );
52
+
53
+ @ CheckForNull
54
+ HealthCheck getHealthcheck ();
55
+
56
+ CreateContainerCmd withHealthcheck (HealthCheck healthCheck );
57
+
58
+ @ CheckForNull
59
+ Boolean getArgsEscaped ();
60
+
61
+ CreateContainerCmd withArgsEscaped (Boolean argsEscaped );
62
+
25
63
@ CheckForNull
26
64
String getDomainName ();
27
65
66
+ CreateContainerCmd withDomainName (String domainName );
67
+
28
68
@ CheckForNull
29
69
String [] getEntrypoint ();
30
70
71
+ CreateContainerCmd withEntrypoint (String ... entrypoint );
72
+
73
+ CreateContainerCmd withEntrypoint (List <String > entrypoint );
74
+
31
75
@ CheckForNull
32
76
String [] getEnv ();
33
77
78
+ CreateContainerCmd withEnv (String ... env );
79
+
80
+ CreateContainerCmd withEnv (List <String > env );
81
+
34
82
@ CheckForNull
35
83
ExposedPort [] getExposedPorts ();
36
84
85
+ CreateContainerCmd withExposedPorts (List <ExposedPort > exposedPorts );
86
+
87
+ CreateContainerCmd withExposedPorts (ExposedPort ... exposedPorts );
88
+
37
89
@ CheckForNull
38
90
String getStopSignal ();
39
91
92
+ CreateContainerCmd withStopSignal (String stopSignal );
93
+
94
+ @ CheckForNull
95
+ Integer getStopTimeout ();
96
+
97
+ CreateContainerCmd withStopTimeout (Integer stopTimeout );
98
+
40
99
@ CheckForNull
41
100
String getHostName ();
42
101
102
+ CreateContainerCmd withHostName (String hostName );
103
+
43
104
@ CheckForNull
44
105
String getImage ();
45
106
107
+ CreateContainerCmd withImage (String image );
108
+
46
109
@ CheckForNull
47
110
String getIpv4Address ();
48
111
112
+ CreateContainerCmd withIpv4Address (String ipv4Address );
113
+
49
114
@ CheckForNull
50
115
String getIpv6Address ();
51
116
117
+ CreateContainerCmd withIpv6Address (String ipv6Address );
118
+
52
119
@ CheckForNull
53
120
Map <String , String > getLabels ();
54
121
122
+ CreateContainerCmd withLabels (Map <String , String > labels );
123
+
55
124
@ CheckForNull
56
125
String getMacAddress ();
57
126
127
+ CreateContainerCmd withMacAddress (String macAddress );
128
+
58
129
@ CheckForNull
59
130
String getName ();
60
131
132
+ CreateContainerCmd withName (String name );
133
+
61
134
@ CheckForNull
62
135
String [] getPortSpecs ();
63
136
137
+ CreateContainerCmd withPortSpecs (String ... portSpecs );
138
+
139
+ CreateContainerCmd withPortSpecs (List <String > portSpecs );
140
+
64
141
@ CheckForNull
65
142
String getUser ();
66
143
144
+ CreateContainerCmd withUser (String user );
145
+
67
146
@ CheckForNull
68
147
Volume [] getVolumes ();
69
148
149
+ CreateContainerCmd withVolumes (Volume ... volumes );
150
+
151
+ CreateContainerCmd withVolumes (List <Volume > volumes );
152
+
70
153
@ CheckForNull
71
154
String getWorkingDir ();
72
155
156
+ CreateContainerCmd withWorkingDir (String workingDir );
157
+
73
158
@ CheckForNull
74
159
Boolean isAttachStderr ();
75
160
161
+ CreateContainerCmd withAttachStderr (Boolean attachStderr );
162
+
76
163
@ CheckForNull
77
164
Boolean isAttachStdin ();
78
165
166
+ CreateContainerCmd withAttachStdin (Boolean attachStdin );
167
+
79
168
@ CheckForNull
80
169
Boolean isAttachStdout ();
81
170
171
+ CreateContainerCmd withAttachStdout (Boolean attachStdout );
172
+
82
173
@ CheckForNull
83
174
Boolean isNetworkDisabled ();
84
175
176
+ CreateContainerCmd withNetworkDisabled (Boolean disableNetwork );
177
+
85
178
@ CheckForNull
86
179
Boolean isStdInOnce ();
87
180
181
+ CreateContainerCmd withStdInOnce (Boolean stdInOnce );
182
+
88
183
@ CheckForNull
89
184
Boolean isStdinOpen ();
90
185
91
- @ CheckForNull
92
- HostConfig getHostConfig ();
186
+ CreateContainerCmd withStdinOpen (Boolean stdinOpen );
93
187
94
188
@ CheckForNull
95
189
Boolean isTty ();
96
190
97
- /**
98
- * While using swarm classic, you can provide an optional auth config which will be used to pull images from a private registry,
99
- * if the swarm node does not already have the docker image.
100
- * Note: This option does not have any effect in normal docker
101
- * @param authConfig The optional auth config
102
- */
103
- CreateContainerCmd withAuthConfig (AuthConfig authConfig );
104
-
105
- /**
106
- * Add network-scoped alias for the container
107
- * @param aliases on ore more aliases
108
- */
109
- CreateContainerCmd withAliases (String ... aliases );
110
-
111
- /**
112
- * Add network-scoped alias for the container
113
- * @param aliases on ore more aliases
114
- */
115
- CreateContainerCmd withAliases (List <String > aliases );
116
-
117
- CreateContainerCmd withAttachStderr (Boolean attachStderr );
118
-
119
- CreateContainerCmd withAttachStdin (Boolean attachStdin );
120
-
121
- CreateContainerCmd withAttachStdout (Boolean attachStdout );
122
-
123
- CreateContainerCmd withCmd (String ... cmd );
124
-
125
- CreateContainerCmd withCmd (List <String > cmd );
126
-
127
- CreateContainerCmd withDomainName (String domainName );
128
-
129
- CreateContainerCmd withEntrypoint (String ... entrypoint );
130
-
131
- CreateContainerCmd withEntrypoint (List <String > entrypoint );
132
-
133
- CreateContainerCmd withEnv (String ... env );
134
-
135
- CreateContainerCmd withEnv (List <String > env );
136
-
137
- CreateContainerCmd withExposedPorts (ExposedPort ... exposedPorts );
138
-
139
- CreateContainerCmd withStopSignal (String stopSignal );
140
-
141
- CreateContainerCmd withExposedPorts (List <ExposedPort > exposedPorts );
142
-
143
- CreateContainerCmd withHostName (String hostName );
144
-
145
- CreateContainerCmd withImage (String image );
146
-
147
- CreateContainerCmd withIpv4Address (String ipv4Address );
148
-
149
- CreateContainerCmd withIpv6Address (String ipv6Address );
150
-
151
- CreateContainerCmd withLabels (Map <String , String > labels );
152
-
153
- CreateContainerCmd withMacAddress (String macAddress );
154
-
155
- CreateContainerCmd withName (String name );
156
-
157
- CreateContainerCmd withNetworkDisabled (Boolean disableNetwork );
158
-
159
- CreateContainerCmd withPortSpecs (String ... portSpecs );
160
-
161
- CreateContainerCmd withPortSpecs (List <String > portSpecs );
162
-
163
- CreateContainerCmd withStdInOnce (Boolean stdInOnce );
164
-
165
- CreateContainerCmd withStdinOpen (Boolean stdinOpen );
166
-
167
191
CreateContainerCmd withTty (Boolean tty );
168
192
169
- CreateContainerCmd withUser (String user );
170
-
171
- CreateContainerCmd withVolumes (Volume ... volumes );
193
+ @ CheckForNull
194
+ List <String > getOnBuild ();
172
195
173
- CreateContainerCmd withVolumes (List <Volume > volumes );
196
+ CreateContainerCmd withOnBuild (List <String > onBuild );
174
197
175
- CreateContainerCmd withWorkingDir (String workingDir );
198
+ @ CheckForNull
199
+ HostConfig getHostConfig ();
176
200
177
201
CreateContainerCmd withHostConfig (HostConfig hostConfig );
178
202
179
203
/**
180
- * @throws NotFoundException
181
- * No such container
182
- * @throws ConflictException
183
- * Named container already exists
204
+ * @throws NotFoundException No such container
205
+ * @throws ConflictException Named container already exists
184
206
*/
185
207
@ Override
186
208
CreateContainerResponse exec () throws NotFoundException , ConflictException ;
0 commit comments