3
3
import com .github .dockerjava .api .exception .ConflictException ;
4
4
import com .github .dockerjava .api .exception .NotFoundException ;
5
5
import com .github .dockerjava .api .model .AuthConfig ;
6
- import com .github .dockerjava .api .model .Bind ;
7
- import com .github .dockerjava .api .model .Capability ;
8
- import com .github .dockerjava .api .model .Device ;
9
6
import com .github .dockerjava .api .model .ExposedPort ;
10
7
import com .github .dockerjava .api .model .HostConfig ;
11
- import com .github .dockerjava .api .model .Link ;
12
- import com .github .dockerjava .api .model .LogConfig ;
13
- import com .github .dockerjava .api .model .LxcConf ;
14
- import com .github .dockerjava .api .model .PortBinding ;
15
- import com .github .dockerjava .api .model .Ports ;
16
- import com .github .dockerjava .api .model .RestartPolicy ;
17
- import com .github .dockerjava .api .model .Ulimit ;
18
8
import com .github .dockerjava .api .model .Volume ;
19
- import com .github .dockerjava .api .model .VolumesFrom ;
20
9
21
10
import javax .annotation .CheckForNull ;
22
11
import java .util .List ;
@@ -30,51 +19,9 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
30
19
@ CheckForNull
31
20
List <String > getAliases ();
32
21
33
- @ CheckForNull
34
- Bind [] getBinds ();
35
-
36
- /**
37
- * @since 1.19
38
- */
39
- @ CheckForNull
40
- Integer getBlkioWeight ();
41
-
42
- @ CheckForNull
43
- Capability [] getCapAdd ();
44
-
45
- @ CheckForNull
46
- Capability [] getCapDrop ();
47
-
48
22
@ CheckForNull
49
23
String [] getCmd ();
50
24
51
- /**
52
- * @since 1.19
53
- */
54
- @ CheckForNull
55
- Integer getCpuPeriod ();
56
-
57
- @ CheckForNull
58
- String getCpusetCpus ();
59
-
60
- /**
61
- * @since 1.19
62
- */
63
- @ CheckForNull
64
- String getCpusetMems ();
65
-
66
- @ CheckForNull
67
- Integer getCpuShares ();
68
-
69
- @ CheckForNull
70
- Device [] getDevices ();
71
-
72
- @ CheckForNull
73
- String [] getDns ();
74
-
75
- @ CheckForNull
76
- String [] getDnsSearch ();
77
-
78
25
@ CheckForNull
79
26
String getDomainName ();
80
27
@@ -90,9 +37,6 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
90
37
@ CheckForNull
91
38
String getStopSignal ();
92
39
93
- @ CheckForNull
94
- String [] getExtraHosts ();
95
-
96
40
@ CheckForNull
97
41
String getHostName ();
98
42
@@ -108,54 +52,21 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
108
52
@ CheckForNull
109
53
Map <String , String > getLabels ();
110
54
111
- @ CheckForNull
112
- Link [] getLinks ();
113
-
114
- @ CheckForNull
115
- LogConfig getLogConfig ();
116
-
117
- @ CheckForNull
118
- LxcConf [] getLxcConf ();
119
-
120
55
@ CheckForNull
121
56
String getMacAddress ();
122
57
123
- @ CheckForNull
124
- Long getMemory ();
125
-
126
- @ CheckForNull
127
- Long getMemorySwap ();
128
-
129
- @ CheckForNull
130
- Integer getMemorySwappiness ();
131
-
132
58
@ CheckForNull
133
59
String getName ();
134
60
135
- @ CheckForNull
136
- String getNetworkMode ();
137
-
138
- @ CheckForNull
139
- Ports getPortBindings ();
140
-
141
61
@ CheckForNull
142
62
String [] getPortSpecs ();
143
63
144
- @ CheckForNull
145
- RestartPolicy getRestartPolicy ();
146
-
147
- @ CheckForNull
148
- Ulimit [] getUlimits ();
149
-
150
64
@ CheckForNull
151
65
String getUser ();
152
66
153
67
@ CheckForNull
154
68
Volume [] getVolumes ();
155
69
156
- @ CheckForNull
157
- VolumesFrom [] getVolumesFrom ();
158
-
159
70
@ CheckForNull
160
71
String getWorkingDir ();
161
72
@@ -171,36 +82,15 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
171
82
@ CheckForNull
172
83
Boolean isNetworkDisabled ();
173
84
174
- /**
175
- * @since 1.19
176
- */
177
- @ CheckForNull
178
- Boolean getOomKillDisable ();
179
-
180
- @ CheckForNull
181
- Boolean getPrivileged ();
182
-
183
- @ CheckForNull
184
- Boolean getPublishAllPorts ();
185
-
186
- @ CheckForNull
187
- Boolean getReadonlyRootfs ();
188
-
189
85
@ CheckForNull
190
86
Boolean isStdInOnce ();
191
87
192
88
@ CheckForNull
193
89
Boolean isStdinOpen ();
194
90
195
- @ CheckForNull
196
- String getPidMode ();
197
-
198
91
@ CheckForNull
199
92
HostConfig getHostConfig ();
200
93
201
- @ CheckForNull
202
- String getCgroupParent ();
203
-
204
94
@ CheckForNull
205
95
Boolean isTty ();
206
96
@@ -230,89 +120,10 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
230
120
231
121
CreateContainerCmd withAttachStdout (Boolean attachStdout );
232
122
233
- CreateContainerCmd withBinds (Bind ... binds );
234
-
235
- CreateContainerCmd withBinds (List <Bind > binds );
236
-
237
- /**
238
- * @since 1.19
239
- */
240
- CreateContainerCmd withBlkioWeight (Integer blkioWeight );
241
-
242
- /**
243
- * Add linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> to the container. For example:
244
- * adding {@link Capability#MKNOD} allows the container to create special files using the 'mknod' command.
245
- */
246
- CreateContainerCmd withCapAdd (Capability ... capAdd );
247
-
248
- /**
249
- * Add linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> to the container. For example:
250
- * adding {@link Capability#MKNOD} allows the container to create special files using the 'mknod' command.
251
- */
252
- CreateContainerCmd withCapAdd (List <Capability > capAdd );
253
-
254
- /**
255
- * Drop linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> from the container. For example:
256
- * dropping {@link Capability#CHOWN} prevents the container from changing the owner of any files.
257
- */
258
- CreateContainerCmd withCapDrop (Capability ... capDrop );
259
-
260
- /**
261
- * Drop linux <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">kernel capability</a> from the container. For example:
262
- * dropping {@link Capability#CHOWN} prevents the container from changing the owner of any files.
263
- */
264
- CreateContainerCmd withCapDrop (List <Capability > capDrop );
265
-
266
123
CreateContainerCmd withCmd (String ... cmd );
267
124
268
125
CreateContainerCmd withCmd (List <String > cmd );
269
126
270
- CreateContainerCmd withContainerIDFile (String containerIDFile );
271
-
272
- /**
273
- * @since 1.19
274
- */
275
- CreateContainerCmd withCpuPeriod (Integer cpuPeriod );
276
-
277
- CreateContainerCmd withCpusetCpus (String cpusetCpus );
278
-
279
- /**
280
- * @since 1.19
281
- */
282
- CreateContainerCmd withCpusetMems (String cpusetMems );
283
-
284
- CreateContainerCmd withCpuShares (Integer cpuShares );
285
-
286
- /**
287
- * Add host devices to the container
288
- */
289
- CreateContainerCmd withDevices (Device ... devices );
290
-
291
- /**
292
- * Add host devices to the container
293
- */
294
- CreateContainerCmd withDevices (List <Device > devices );
295
-
296
- /**
297
- * Set custom DNS servers
298
- */
299
- CreateContainerCmd withDns (String ... dns );
300
-
301
- /**
302
- * Set custom DNS servers
303
- */
304
- CreateContainerCmd withDns (List <String > dns );
305
-
306
- /**
307
- * Set custom DNS search domains
308
- */
309
- CreateContainerCmd withDnsSearch (String ... dnsSearch );
310
-
311
- /**
312
- * Set custom DNS search domains
313
- */
314
- CreateContainerCmd withDnsSearch (List <String > dnsSearch );
315
-
316
127
CreateContainerCmd withDomainName (String domainName );
317
128
318
129
CreateContainerCmd withEntrypoint (String ... entrypoint );
@@ -329,16 +140,6 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
329
140
330
141
CreateContainerCmd withExposedPorts (List <ExposedPort > exposedPorts );
331
142
332
- /**
333
- * Add hostnames to /etc/hosts in the container
334
- */
335
- CreateContainerCmd withExtraHosts (String ... extraHosts );
336
-
337
- /**
338
- * Add hostnames to /etc/hosts in the container
339
- */
340
- CreateContainerCmd withExtraHosts (List <String > extraHosts );
341
-
342
143
CreateContainerCmd withHostName (String hostName );
343
144
344
145
CreateContainerCmd withImage (String image );
@@ -349,114 +150,30 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
349
150
350
151
CreateContainerCmd withLabels (Map <String , String > labels );
351
152
352
- /**
353
- * Add link to another container.
354
- */
355
- CreateContainerCmd withLinks (Link ... links );
356
-
357
- /**
358
- * Add link to another container.
359
- */
360
- CreateContainerCmd withLinks (List <Link > links );
361
-
362
- CreateContainerCmd withLogConfig (LogConfig logConfig );
363
-
364
- CreateContainerCmd withLxcConf (LxcConf ... lxcConf );
365
-
366
- CreateContainerCmd withLxcConf (List <LxcConf > lxcConf );
367
-
368
153
CreateContainerCmd withMacAddress (String macAddress );
369
154
370
- CreateContainerCmd withMemory (Long memory );
371
-
372
- CreateContainerCmd withMemorySwap (Long memorySwap );
373
-
374
- CreateContainerCmd withMemorySwappiness (Integer memorySwappiness );
375
-
376
155
CreateContainerCmd withName (String name );
377
156
378
157
CreateContainerCmd withNetworkDisabled (Boolean disableNetwork );
379
158
380
- /**
381
- * Set the Network mode for the container
382
- * <ul>
383
- * <li>'bridge': creates a new network stack for the container on the docker bridge</li>
384
- * <li>'none': no networking for this container</li>
385
- * <li>'container:<name|id>': reuses another container network stack</li>
386
- * <li>'host': use the host network stack inside the container. Note: the host mode gives the container full access to local system
387
- * services such as D-bus and is therefore considered insecure.</li>
388
- * </ul>
389
- */
390
- CreateContainerCmd withNetworkMode (String networkMode );
391
-
392
- /**
393
- * @since 1.19
394
- */
395
- CreateContainerCmd withOomKillDisable (Boolean oomKillDisable );
396
-
397
- /**
398
- * Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the
399
- * <code>docker run</code> CLI command.
400
- */
401
- CreateContainerCmd withPortBindings (PortBinding ... portBindings );
402
-
403
- /**
404
- * Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the
405
- * <code>docker run</code> CLI command.
406
- */
407
- CreateContainerCmd withPortBindings (List <PortBinding > portBindings );
408
-
409
- /**
410
- * Add the port bindings that are contained in the given {@link Ports} object.
411
- *
412
- * @see #withPortBindings(PortBinding...)
413
- */
414
- CreateContainerCmd withPortBindings (Ports portBindings );
415
-
416
159
CreateContainerCmd withPortSpecs (String ... portSpecs );
417
160
418
161
CreateContainerCmd withPortSpecs (List <String > portSpecs );
419
162
420
- CreateContainerCmd withPrivileged (Boolean privileged );
421
-
422
- CreateContainerCmd withPublishAllPorts (Boolean publishAllPorts );
423
-
424
- CreateContainerCmd withReadonlyRootfs (Boolean readonlyRootfs );
425
-
426
- /**
427
- * Set custom {@link RestartPolicy} for the container. Defaults to {@link RestartPolicy#noRestart()}
428
- */
429
- CreateContainerCmd withRestartPolicy (RestartPolicy restartPolicy );
430
-
431
163
CreateContainerCmd withStdInOnce (Boolean stdInOnce );
432
164
433
165
CreateContainerCmd withStdinOpen (Boolean stdinOpen );
434
166
435
167
CreateContainerCmd withTty (Boolean tty );
436
168
437
- CreateContainerCmd withUlimits (Ulimit ... ulimits );
438
-
439
- CreateContainerCmd withUlimits (List <Ulimit > ulimits );
440
-
441
169
CreateContainerCmd withUser (String user );
442
170
443
171
CreateContainerCmd withVolumes (Volume ... volumes );
444
172
445
173
CreateContainerCmd withVolumes (List <Volume > volumes );
446
174
447
- CreateContainerCmd withVolumesFrom (VolumesFrom ... volumesFrom );
448
-
449
- CreateContainerCmd withVolumesFrom (List <VolumesFrom > volumesFrom );
450
-
451
175
CreateContainerCmd withWorkingDir (String workingDir );
452
176
453
- CreateContainerCmd withCgroupParent (String cgroupParent );
454
-
455
- /**
456
- * Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace inside the container
457
- */
458
- CreateContainerCmd withPidMode (String pidMode );
459
-
460
177
CreateContainerCmd withHostConfig (HostConfig hostConfig );
461
178
462
179
/**
0 commit comments